Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
TXT.cs
1using System;
2using System.Collections.Generic;
3using System.IO;
4using System.Text;
8
10{
14 public class TXT : ResourceRecord
15 {
16 private string[] text;
17
21 public TXT()
22 : base()
23 {
24 this.text = null;
25 }
26
36 public TXT(string Name, TYPE Type, CLASS Class, uint Ttl, Stream Data, long EndPos)
37 : base(Name, Type, Class, Ttl)
38 {
39 List<string> Text = new List<string>();
40
41 while (Data.Position < EndPos)
42 Text.Add(DnsClient.ReadString(Data));
43
44 this.text = Text.ToArray();
45 }
46
50 [DefaultValueNull]
51 public string[] Text
52 {
53 get => this.text;
54 set => this.text = value;
55 }
56
58 public override string ToString()
59 {
60 StringBuilder sb = new StringBuilder(base.ToString());
61
62 foreach (string s in this.text)
63 {
64 sb.Append('\t');
65 sb.Append(s);
66 }
67
68 return sb.ToString();
69 }
70
71 }
72}
Abstract base class for DNS clients.
Definition: DnsClient.cs:21
Abstract base class for a resource record.
string[] Text
Descriptive text.
Definition: TXT.cs:52
TXT(string Name, TYPE Type, CLASS Class, uint Ttl, Stream Data, long EndPos)
Descriptive text
Definition: TXT.cs:36
CLASS
TYPE fields are used in resource records.
Definition: CLASS.cs:11
TYPE
TYPE fields are used in resource records.
Definition: TYPE.cs:11