49 references to QueryType
Microsoft.Extensions.ServiceDiscovery.Dns (48)
Resolver\DnsDataReader.cs (3)
37internal bool TryReadQuestion(out EncodedDomainName name, out QueryType type, out QueryClass @class) 48type = (QueryType)typeAsInt; 95record = new DnsResourceRecord(name, (QueryType)type, (QueryClass)@class, (int)ttl, data);
Resolver\DnsDataWriter.cs (1)
33internal bool TryWriteQuestion(EncodedDomainName name, QueryType type, QueryClass @class)
Resolver\DnsResolver.cs (30)
68return SendQueryWithTelemetry(name, dnsSafeName, QueryType.SRV, ProcessResponse, cancellationToken); 70static (SendQueryError, ServiceResult[]) ProcessResponse(EncodedDomainName dnsSafeName, QueryType queryType, DnsResponse response) 76if (answer.Type == QueryType.SRV) 98if (additional.Name.Equals(target) && (additional.Type == QueryType.A || additional.Type == QueryType.AAAA)) 173var queryType = addressFamily == AddressFamily.InterNetwork ? QueryType.A : QueryType.AAAA; 176static (SendQueryError error, AddressResult[] result) ProcessResponse(EncodedDomainName dnsSafeName, QueryType queryType, DnsResponse response) 199case QueryType.CNAME: 245if (answer.Type == QueryType.CNAME) 305Debug.Assert(record.Type == QueryType.CNAME, "Only CNAME records should be processed here."); 328static bool TryReadAddress(in DnsResourceRecord record, QueryType type, [NotNullWhen(true)] out IPAddress? target) 330Debug.Assert(record.Type is QueryType.A or QueryType.AAAA, "Only CNAME records should be processed here."); 333if (record.Type == QueryType.A && record.Data.Length != IPv4Length || 334record.Type == QueryType.AAAA && record.Data.Length != IPv6Length) 345private async ValueTask<TResult[]> SendQueryWithTelemetry<TResult>(string name, EncodedDomainName dnsSafeName, QueryType queryType, Func<EncodedDomainName, QueryType, DnsResponse, (SendQueryError error, TResult[] result)> processResponseFunc, CancellationToken cancellationToken) 361async ValueTask<(SendQueryError error, TResult[] result)> SendQueryWithRetriesAsync<TResult>(string name, EncodedDomainName dnsSafeName, QueryType queryType, Func<EncodedDomainName, QueryType, DnsResponse, (SendQueryError error, TResult[] result)> processResponseFunc, CancellationToken cancellationToken) 466internal async ValueTask<SendQueryResult> SendQueryToServerWithTimeoutAsync(IPEndPoint serverEndPoint, string name, EncodedDomainName dnsSafeName, QueryType queryType, int attempt, CancellationToken cancellationToken) 498private async ValueTask<SendQueryResult> SendQueryToServerAsync(IPEndPoint serverEndPoint, string name, EncodedDomainName dnsSafeName, QueryType queryType, int attempt, CancellationToken cancellationToken) 545!responseReader.TryReadQuestion(out var qName, out var qType, out var qClass) || 624DnsResourceRecord? soa = authorities.FirstOrDefault(r => r.Type == QueryType.SOA); 658if (!authorities.Any(r => r.Type == QueryType.NS) && GetNegativeCacheExpiration(createdAt, authorities, out DateTime newExpiration)) 688internal static (DnsDataReader reader, DnsMessageHeader header, SendQueryError sendError) SendDnsQueryCustomTransport(Func<Memory<byte>, int, int> callback, EncodedDomainName dnsSafeName, QueryType queryType) 718internal static async ValueTask<(DnsDataReader reader, DnsMessageHeader header)> SendDnsQueryCoreUdpAsync(IPEndPoint serverEndPoint, EncodedDomainName dnsSafeName, QueryType queryType, CancellationToken cancellationToken) 767internal static async ValueTask<(DnsDataReader reader, DnsMessageHeader header, SendQueryError error)> SendDnsQueryCoreTcpAsync(IPEndPoint serverEndPoint, EncodedDomainName dnsSafeName, QueryType queryType, CancellationToken cancellationToken) 831private static (ushort id, int length) EncodeQuestion(Memory<byte> buffer, EncodedDomainName dnsSafeName, QueryType queryType)
Resolver\DnsResolver.Log.cs (9)
13public static partial void Query(ILogger logger, QueryType queryType, string queryName, IPEndPoint server, int attempt); 16public static partial void ResultTruncated(ILogger logger, QueryType queryType, string queryName, IPEndPoint server, int attempt); 19public static partial void ErrorResponseCode(ILogger logger, QueryType queryType, string queryName, IPEndPoint server, QueryResponseCode responseCode); 22public static partial void Timeout(ILogger logger, QueryType queryType, string queryName, IPEndPoint server, int attempt); 25public static partial void NoData(ILogger logger, QueryType queryType, string queryName, IPEndPoint server, int attempt); 28public static partial void NameError(ILogger logger, QueryType queryType, string queryName, IPEndPoint server, int attempt); 31public static partial void MalformedResponse(ILogger logger, QueryType queryType, string queryName, IPEndPoint server, int attempt); 34public static partial void NetworkError(ILogger logger, QueryType queryType, string queryName, IPEndPoint server, int attempt, Exception exception); 37public static partial void QueryError(ILogger logger, QueryType queryType, string queryName, IPEndPoint server, int attempt, Exception exception);
Resolver\DnsResolver.Telemetry.cs (3)
18public static NameResolutionActivity StartNameResolution(string hostName, QueryType queryType, long startingTimestamp) 28public static void StopNameResolution(string hostName, QueryType queryType, in NameResolutionActivity activity, object? answers, SendQueryError error, long endingTimestamp) 61public NameResolutionActivity(string hostName, QueryType queryType, long startingTimestamp)
Resolver\DnsResourceRecord.cs (2)
9public QueryType Type { get; } 14public DnsResourceRecord(EncodedDomainName name, QueryType type, QueryClass @class, int ttl, ReadOnlyMemory<byte> data)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (1)
Resolver\LoopbackDnsServer.cs (1)
37!reader.TryReadQuestion(out var name, out var type, out var @class))