Repository navigation
Expand file tree
/
Copy pathDNSClientResultString.cs
More file actions
41 lines (37 loc) · 1.69 KB
/
Copy pathDNSClientResultString.cs
File metadata and controls
41 lines (37 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
namespace NETworkManager.Utilities;
/// <summary>
/// Class is used to store the <see cref="string" /> result from a <see cref="DNSClient" /> query.
/// </summary>
public class DNSClientResultString : DNSClientResult
{
/// <summary>
/// Create an instance of <see cref="DNSClientResultString" /> with parameters.
/// </summary>
/// <param name="value">Query result as <see cref="string" />.</param>
/// <param name="dnsServer">DNS server which was used for resolving the query.</param>
public DNSClientResultString(string value, string dnsServer) : base(dnsServer)
{
Value = value;
}
/// <summary>
/// Create an instance of <see cref="DNSClientResultString" /> with parameters if an error has occurred.
/// </summary>
/// <param name="hasError">Indicates if an error has occurred.</param>
/// <param name="errorMessage">Error message when an error has occurred.</param>
public DNSClientResultString(bool hasError, string errorMessage) : base(hasError, errorMessage)
{
}
/// <summary>
/// Create an instance of <see cref="DNSClientResultString" /> with parameters if an error has occurred.
/// </summary>
/// <param name="hasError">Indicates if an error has occurred.</param>
/// <param name="errorMessage">Error message when an error has occurred.</param>
/// <param name="dnsServer">DNS server which was used for resolving the query.</param>
public DNSClientResultString(bool hasError, string errorMessage, string dnsServer) : base(hasError, errorMessage, dnsServer)
{
}
/// <summary>
/// Query result as <see cref="string" />.
/// </summary>
public string Value { get; set; }
}