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