internal override bool EqualsData(DnsOption other) { DnsOptionLongLivedQuery castedOther = (DnsOptionLongLivedQuery)other; return(Version.Equals(castedOther.Version) && OpCode.Equals(castedOther.OpCode) && ErrorCode.Equals(castedOther.ErrorCode) && Id.Equals(castedOther.Id) && LeaseLife.Equals(castedOther.LeaseLife)); }
internal static DnsOption CreateInstance(DnsOptionCode code, DataSegment data) { switch (code) { case DnsOptionCode.LongLivedQuery: return(DnsOptionLongLivedQuery.Read(data)); case DnsOptionCode.UpdateLease: return(DnsOptionUpdateLease.Read(data)); case DnsOptionCode.ClientSubnet: return(DnsOptionClientSubnet.Read(data)); case DnsOptionCode.NameServerIdentifier: default: return(new DnsOptionAnything(code, data)); } }