示例#1
0
		protected override void ProcessRecord()
		{
			if ((this.Type == RecordType.OPT || this.Type == RecordType.DS || this.Type == RecordType.RRSIG || this.Type == RecordType.NSEC || this.Type == RecordType.DNSKEY || this.Type == RecordType.DHCID || this.Type == RecordType.NSEC3 || this.Type == RecordType.NSEC3PARAM) && (Environment.OSVersion.Version.Major < 6 || Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Minor == 0))
			{
				throw new PlatformNotSupportedException();
			}
			else
			{
				try
				{
					string reverseLookup = utility.ConvertNumericToReverseLookup(this.Name);
					if (this.Type == RecordType.UNKNOWN)
					{
						this.Type = RecordType.PTR;
					}
					this.Name = reverseLookup;
				}
				catch
				{
					if (this.Type == RecordType.UNKNOWN)
					{
						this.Type = RecordType.UNKNOWN;
					}
				}
				api.QueryParameters dnsOnly = new api.QueryParameters();
				dnsOnly.DnsOnly = this.DnsOnly;
				dnsOnly.CacheOnly = this.CacheOnly;
				dnsOnly.DnssecOk = this.DnssecOk;
				dnsOnly.DnssecCd = this.DnssecCd;
				dnsOnly.NoHostsFile = this.NoHostsFile;
				dnsOnly.LlmnrNetbiosOnly = this.LlmnrNetbiosOnly;
				dnsOnly.LlmnrFallback = this.LlmnrFallback;
				dnsOnly.LlmnrOnly = this.LlmnrOnly;
				dnsOnly.NetbiosFallback = this.NetbiosFallback;
				dnsOnly.NoIdn = this.NoIdn;
				dnsOnly.NoRecursion = this.NoRecursion;
				dnsOnly.QuickTimeout = this.QuickTimeout;
				dnsOnly.TcpOnly = this.TcpOnly;
				api.SendDnsQuery(this, this.Name, this.Type, this.Server, dnsOnly);
				return;
			}
		}