Beispiel #1
0
 /// <summary>
 /// Two A6 resource datas are equal iff their prefix length, address suffix and prefix name fields are equal.
 /// </summary>
 public bool Equals(DnsResourceDataA6 other)
 {
     return(other != null &&
            PrefixLength.Equals(other.PrefixLength) &&
            AddressSuffix.Equals(other.AddressSuffix) &&
            PrefixName.Equals(other.PrefixName));
 }
Beispiel #2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public HandmadeSerializer
 (
     PrefixLength prefixLength
 )
 {
     PrefixLength = prefixLength;
 }
Beispiel #3
0
 /// <summary>
 /// Two DnsAddressPrefix are equal iff their address family, prefix length, negation and address family dependent part are equal.
 /// </summary>
 public bool Equals(DnsAddressPrefix other)
 {
     return(other != null &&
            AddressFamily.Equals(other.AddressFamily) &&
            PrefixLength.Equals(other.PrefixLength) &&
            Negation.Equals(other.Negation) &&
            AddressFamilyDependentPart.Equals(other.AddressFamilyDependentPart));
 }
Beispiel #4
0
 public override DestinationInfo CreateDestinationInfo()
 {
     return(new DestinationInfo
     {
         IsOpenExternally = IsOpenExternally,
         TypeName = GetType().ToString(),
         Data = new string[] { Address.ToString(), PrefixLength.ToString(), Port.ToString() }
     });
 }
Beispiel #5
0
        public override DestinationInfo CreateDestinationInfo()
        {
            var info = new DestinationInfo();

            info.IsOpenExternally = IsOpenExternally;
            info.TypeName         = GetType().ToString();
            info.Data             = new[] {
                IPAddress.ToString(),
                    PrefixLength.ToString(),
                    Port.ToString()
            };
            return(info);
        }
Beispiel #6
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     return(Address.GetHashCode() ^ PrefixLength.GetHashCode());
 }
Beispiel #7
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public HandmadeSerializer()
 {
     PrefixLength = PrefixLength.Full;
 }