internal static DnsResourceData Read(DnsDatagram dns, DnsType type, int offsetInDns, int length) { DnsResourceData prototype = DnsResourceData.TryGetPrototype(type); if (prototype != null) { return(prototype.CreateInstance(dns, offsetInDns, length)); } return((DnsResourceData) new DnsResourceDataAnything(dns.Subsegment(offsetInDns, length))); }
public static Type GetDnsResourceDataType(DnsType dnsType) { DnsResourceData prototype = DnsResourceData.TryGetPrototype(dnsType); if (prototype == null) { return((Type)null); } return(prototype.GetType()); }