Пример #1
0
        public MbRecord(ResourceRecordInfo info, DnsString name)
            : base(info)
        {
            if (name == null)
            {
                throw new ArgumentNullException(nameof(name));
            }

            MadName = name;
        }
Пример #2
0
        public PtrRecord(ResourceRecordInfo info, DnsString ptrDName)
            : base(info)
        {
            if (ptrDName == null)
            {
                throw new ArgumentNullException(nameof(ptrDName));
            }

            PtrDomainName = ptrDName;
        }
Пример #3
0
        public AddressRecord(ResourceRecordInfo info, IPAddress address)
            : base(info)
        {
            if (address == null)
            {
                throw new ArgumentNullException(nameof(address));
            }

            Address = address;
        }
Пример #4
0
        public MxRecord(ResourceRecordInfo info, ushort preference, DnsString domainName)
            : base(info)
        {
            if (domainName == null)
            {
                throw new ArgumentNullException(nameof(domainName));
            }

            Preference = preference;
            Exchange   = domainName;
        }
Пример #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SoaRecord" /> class.
 /// </summary>
 /// <param name="info">The information.</param>
 /// <param name="mName">Name original domain name.</param>
 /// <param name="rName">Name responsible domain name.</param>
 /// <param name="serial">The serial number.</param>
 /// <param name="refresh">The refresh time.</param>
 /// <param name="retry">The retry time.</param>
 /// <param name="expire">The expire time.</param>
 /// <param name="minimum">The minimum TTL.</param>
 /// <exception cref="System.ArgumentNullException">
 /// If <paramref name="info"/> or <paramref name="mName"/> or <paramref name="rName"/> is null.
 /// </exception>
 public SoaRecord(ResourceRecordInfo info, DnsString mName, DnsString rName, uint serial, uint refresh, uint retry, uint expire, uint minimum)
     : base(info)
 {
     MName   = mName ?? throw new ArgumentNullException(nameof(mName));
     RName   = rName ?? throw new ArgumentNullException(nameof(rName));
     Serial  = serial;
     Refresh = refresh;
     Retry   = retry;
     Expire  = expire;
     Minimum = minimum;
 }
Пример #6
0
 public SoaRecord(ResourceRecordInfo info, DnsString mName, DnsString rName, uint serial, uint refresh, uint retry, uint expire, uint minimum)
     : base(info)
 {
     MName   = mName;
     RName   = rName;
     Serial  = serial;
     Refresh = refresh;
     Retry   = retry;
     Expire  = expire;
     Minimum = minimum;
 }
Пример #7
0
        public UriRecord(ResourceRecordInfo info, ushort priority, ushort weight, string target)
            : base(info)
        {
            if (string.IsNullOrWhiteSpace(target))
            {
                throw new ArgumentNullException(nameof(target));
            }

            Target   = target;
            Priority = priority;
            Weigth   = weight;
        }
Пример #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NullRecord" /> class.
 /// </summary>
 /// <param name="info">The information.</param>
 /// <param name="anything">Anything.</param>
 /// <exception cref="System.ArgumentNullException">If <paramref name="info"/> or <paramref name="anything"/> is null.</exception>
 public NullRecord(ResourceRecordInfo info, byte[] anything)
     : base(info)
 {
     Anything = anything ?? throw new ArgumentNullException(nameof(anything));
     try
     {
         AsString = Encoding.UTF8.GetString(anything);
     }
     catch
     {
         // ignore errors.
     }
 }
Пример #9
0
        public RpRecord(ResourceRecordInfo info, DnsString mailbox, DnsString textName)
            : base(info)
        {
            if (mailbox == null)
            {
                throw new ArgumentNullException(nameof(mailbox));
            }
            if (textName == null)
            {
                throw new ArgumentNullException(nameof(textName));
            }

            MailboxDomainName = mailbox;
            TextDomainName    = textName;
        }
Пример #10
0
        public TxtRecord(ResourceRecordInfo info, string[] values, string[] utf8Values)
            : base(info)
        {
            if (values == null)
            {
                throw new ArgumentNullException(nameof(values));
            }
            if (utf8Values == null)
            {
                throw new ArgumentNullException(nameof(utf8Values));
            }

            EscapedText = values;
            Text        = utf8Values;
        }
Пример #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RRSigRecord"/> class.
 /// </summary>
 /// <param name="info"></param>
 /// <param name="coveredType"></param>
 /// <param name="algorithm"></param>
 /// <param name="labels"></param>
 /// <param name="originalTtl"></param>
 /// <param name="signatureExpiration"></param>
 /// <param name="signatureInception"></param>
 /// <param name="keyTag"></param>
 /// <param name="signersName"></param>
 /// <param name="signature"></param>
 /// <exception cref="ArgumentNullException">If <paramref name="info"/>, <paramref name="signersName"/> or <paramref name="signature"/> is null.</exception>
 public RRSigRecord(
     ResourceRecordInfo info,
     int coveredType,
     byte algorithm,
     byte labels,
     long originalTtl,
     long signatureExpiration,
     long signatureInception,
     int keyTag,
     DnsString signersName,
     byte[] signature)
     : base(info)
 {
     CoveredType         = (ResourceRecordType)coveredType;
     Algorithm           = (DnsSecurityAlgorithm)algorithm;
     Labels              = labels;
     OriginalTtl         = originalTtl;
     SignatureExpiration = FromUnixTimeSeconds(signatureExpiration);
     SignatureInception  = FromUnixTimeSeconds(signatureInception);
     KeyTag              = keyTag;
     SignersName         = signersName ?? throw new ArgumentNullException(nameof(signersName));
     Signature           = signature ?? throw new ArgumentNullException(nameof(signature));
     SignatureAsString   = Convert.ToBase64String(signature);
 }
Пример #12
0
 public DnsResourceRecord(ResourceRecordInfo info)
     : base(info.DomainName, info.RecordType, info.RecordClass, info.TimeToLive, info.RawDataLength)
 {
 }
Пример #13
0
 public AaaaRecord(ResourceRecordInfo info, IPAddress address) : base(info, address)
 {
 }
Пример #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NsRecord"/> class.
 /// </summary>
 /// <param name="info">The information.</param>
 /// <param name="name">The name.</param>
 /// <exception cref="System.ArgumentNullException">If <paramref name="name"/> or <paramref name="info"/> is null.</exception>
 public NsRecord(ResourceRecordInfo info, DnsString name)
     : base(info)
 {
     NSDName = name ?? throw new ArgumentNullException(nameof(name));
 }
Пример #15
0
 /// <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="System.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));
 }
Пример #16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CaaRecord"/> class.
 /// </summary>
 /// <param name="info">The information.</param>
 /// <param name="flags">The flags.</param>
 /// <param name="tag">The tag.</param>
 /// <param name="value">The value.</param>
 /// <exception cref="System.ArgumentNullException">If <paramref name="info"/> or <paramref name="tag"/> or <paramref name="value"/> is null.</exception>
 public CaaRecord(ResourceRecordInfo info, byte flags, string tag, string value) : base(info)
 {
     Flags = flags;
     Tag   = tag ?? throw new ArgumentNullException(nameof(tag));
     Value = value ?? throw new ArgumentNullException(nameof(value));
 }
Пример #17
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="info">The information.</param>
 /// <param name="algorithm">The algorithm.</param>
 /// <param name="fingerprintType">The fingerprint type.</param>
 /// <param name="fingerprint">The fingerprint.</param>
 public SshfpRecord(ResourceRecordInfo info, SshfpAlgorithm algorithm, SshfpFingerprintType fingerprintType, string fingerprint) : base(info)
 {
     Algorithm       = algorithm;
     FingerprintType = fingerprintType;
     Fingerprint     = fingerprint;
 }
Пример #18
0
 public CaaRecord(ResourceRecordInfo info, byte flags, string tag, string value) : base(info)
 {
     Flags = flags;
     Tag   = tag;
     Value = value;
 }
Пример #19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UnknownRecord" /> class.
 /// </summary>
 /// <param name="info">The information.</param>
 /// <param name="data">The raw data.</param>
 /// <exception cref="System.ArgumentNullException">If <paramref name="info"/> or <paramref name="data"/> is null.</exception>
 public UnknownRecord(ResourceRecordInfo info, byte[] data)
     : base(info)
 {
     Data         = data ?? throw new ArgumentNullException(nameof(data));
     DataAsString = Convert.ToBase64String(data);
 }
Пример #20
0
 public MInfoRecord(ResourceRecordInfo info, DnsString rmailBox, DnsString emailBox)
     : base(info)
 {
     RMailBox = rmailBox;
     EmailBox = emailBox;
 }
Пример #21
0
 public HInfoRecord(ResourceRecordInfo info, string cpu, string os)
     : base(info)
 {
     Cpu = cpu;
     OS  = os;
 }
Пример #22
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NullRecord" /> class.
 /// </summary>
 /// <param name="info">The information.</param>
 /// <param name="data">The raw data.</param>
 /// <exception cref="System.ArgumentNullException">If <paramref name="info"/> or <paramref name="data"/> is null.</exception>
 public UnknownRecord(ResourceRecordInfo info, byte[] data)
     : base(info)
 {
     Data = data ?? throw new ArgumentNullException(nameof(data));
 }
Пример #23
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MInfoRecord"/> class.
 /// </summary>
 /// <param name="info">The information.</param>
 /// <param name="rmailBox">The <c>RMAILBX</c>.</param>
 /// <param name="emailBox">The <c>EMAILBX</c>.</param>
 /// <exception cref="ArgumentNullException">If <paramref name="info"/> or <paramref name="rmailBox"/> or <paramref name="emailBox"/> is null.</exception>
 public MInfoRecord(ResourceRecordInfo info, DnsString rmailBox, DnsString emailBox)
     : base(info)
 {
     RMailBox = rmailBox ?? throw new ArgumentNullException(nameof(rmailBox));
     EmailBox = emailBox ?? throw new ArgumentNullException(nameof(emailBox));
 }
Пример #24
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AfsDbRecord"/> class.
 /// </summary>
 /// <param name="info">The information.</param>
 /// <param name="type">The type.</param>
 /// <param name="name">The name.</param>
 /// <exception cref="System.ArgumentNullException">If <paramref name="info"/> or <paramref name="name"/> is null.</exception>
 public AfsDbRecord(ResourceRecordInfo info, AfsType type, DnsString name) : base(info)
 {
     SubType  = type;
     Hostname = name ?? throw new ArgumentNullException(nameof(name));
 }
Пример #25
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NullRecord" /> class.
 /// </summary>
 /// <param name="info">The information.</param>
 /// <param name="anything">Anything.</param>
 /// <exception cref="System.ArgumentNullException">If <paramref name="info"/> or <paramref name="anything"/> is null.</exception>
 public NullRecord(ResourceRecordInfo info, byte[] anything)
     : base(info)
 {
     Anything = anything ?? throw new ArgumentNullException(nameof(anything));
 }
Пример #26
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CNameRecord"/> class.
 /// </summary>
 /// <param name="info">The information.</param>
 /// <param name="canonicalName">The canonical name.</param>
 /// <exception cref="System.ArgumentNullException">If <paramref name="canonicalName"/> or <paramref name="info"/> is null.</exception>
 public CNameRecord(ResourceRecordInfo info, DnsString canonicalName)
     : base(info)
 {
     CanonicalName = canonicalName ?? throw new ArgumentNullException(nameof(canonicalName));
 }
Пример #27
0
 public AfsDbRecord(ResourceRecordInfo info, AfsType type, DnsString name) : base(info)
 {
     SubType  = type;
     Hostname = name;
 }
Пример #28
0
 public NullRecord(ResourceRecordInfo info, byte[] anything)
     : base(info)
 {
     Anything = anything;
 }