internal static DnsOption CreateInstance(DnsOptionCode code, DataSegment data) { switch (code) { case DnsOptionCode.LongLivedQuery: return((DnsOption)DnsOptionLongLivedQuery.Read(data)); case DnsOptionCode.UpdateLease: return((DnsOption)DnsOptionUpdateLease.Read(data)); default: return((DnsOption) new DnsOptionAnything(code, data)); } }
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)); } }