12 [CollectionName(
"DnsCache")]
13 [NoBackup(
"High probability DNS records are not up-to-date at time of restoration. By not including these records, new ones will be fetched, if requested.")]
14 [Index(
"Name",
"Type",
"Class")]
17 private Guid objectId = Guid.Empty;
18 private string name =
string.Empty;
21 private DateTime expires = DateTime.MinValue;
25 private byte[] raw =
null;
41 set => this.objectId = value;
50 set => this.name = value;
59 set => this.type = value;
68 set => this._class = value;
74 [DefaultValueDateTimeMinValue]
78 set => this.expires = value;
88 set => this.answer = value;
97 get => this.authority;
98 set => this.authority = value;
107 get => this.additional;
108 set => this.additional = value;
118 set => this.raw = value;
124 StringBuilder sb =
new StringBuilder();
127 sb.AppendLine(this.name);
129 sb.AppendLine(this.type.ToString());
130 sb.Append(
"Class: ");
131 sb.AppendLine(this._class.ToString());
132 sb.Append(
"Expires: ");
133 sb.AppendLine(this.expires.ToString());
135 Append(sb,
"Answer", this.answer);
136 Append(sb,
"Authority", this.authority);
137 Append(sb,
"Additional", this.additional);
139 return sb.ToString();
142 private static void Append(StringBuilder sb,
string Label,
ResourceRecord[] Records)
144 if ((Records?.Length ?? 0) > 0)
147 sb.AppendLine(Label);
148 sb.AppendLine(
new string(
'=', Label.Length + 3));
override string ToString()
ResourceRecord[] Authority
Authority resource records
ResourceRecord[] Answer
Answer resource records
QCLASS Class
Question CLASS
DnsResponse()
Stored DNS Query
DateTime Expires
When record expires
byte[] Raw
Raw DNS message
ResourceRecord[] Additional
Additional resource records
Abstract base class for a resource record.
override string ToString()
QTYPE
QTYPE fields appear in the question part of a query.
QCLASS
QCLASS fields appear in the question section of a query.