-
-
Notifications
You must be signed in to change notification settings - Fork 131
/
MgRecord.cs
54 lines (45 loc) · 1.89 KB
/
MgRecord.cs
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
42
43
44
45
46
47
48
49
50
51
52
53
54
using System;
namespace DnsClient.Protocol
{
/*
https://tools.ietf.org/html/rfc1035#section-3.3.6:
3.3.6. MG RDATA format (EXPERIMENTAL)
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
/ MGMNAME /
/ /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
where:
MGMNAME A <domain-name> which specifies a mailbox which is a
member of the mail group specified by the domain name.
MG records cause no additional section processing.
*/
/// <summary>
/// A <see cref="DnsResourceRecord"/> representing a domain name which specifies a mailbox which is a member of the mail group specified by the domain name.
/// </summary>
/// <seealso href="https://tools.ietf.org/html/rfc1035#section-3.3.6">RFC 1035</seealso>
public class MgRecord : DnsResourceRecord
{
/// <summary>
/// Gets a domain name which specifies a mailbox which is a member of the mail group specified by the domain name.
/// </summary>
/// <value>
/// The domain name.
/// </value>
public DnsString MgName { get; }
/// <summary>
/// Initializes a new instance of the <see cref="MgRecord"/> class.
/// </summary>
/// <param name="info">The information.</param>
/// <param name="domainName">The domain name.</param>
/// <exception cref="ArgumentNullException">If <paramref name="domainName"/> or <paramref name="info"/> is null.</exception>
public MgRecord(ResourceRecordInfo info, DnsString domainName)
: base(info)
{
MgName = domainName ?? throw new ArgumentNullException(nameof(domainName));
}
private protected override string RecordToString()
{
return MgName.Value;
}
}
}