77 references to QueryType
Microsoft.Extensions.ServiceDiscovery.Dns (76)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LoggerMessage.g.cs (28)
80private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __QueryCallback = 81global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(1, "Query"), "Resolving {QueryType} {QueryName} on {Server} attempt {Attempt}", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 84public static partial void Query(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt) 92private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __ResultTruncatedCallback = 93global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(2, "ResultTruncated"), "Result truncated for {QueryType} {QueryName} from {Server} attempt {Attempt}. Restarting over TCP", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 96public static partial void ResultTruncated(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt) 108private readonly global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType _queryType; 113public __ErrorResponseCodeStruct(global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryResponseCode responseCode) 126var QueryType = this._queryType; 162public static partial void ErrorResponseCode(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryResponseCode responseCode) 175private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __TimeoutCallback = 176global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Warning, new global::Microsoft.Extensions.Logging.EventId(4, "Timeout"), "Query {QueryType} {QueryName} on {Server} attempt {Attempt} timed out.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 179public static partial void Timeout(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt) 187private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __NoDataCallback = 188global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Warning, new global::Microsoft.Extensions.Logging.EventId(5, "NoData"), "Query {QueryType} {QueryName} on {Server} attempt {Attempt}: no data matching given query type.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 191public static partial void NoData(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt) 199private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __NameErrorCallback = 200global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Warning, new global::Microsoft.Extensions.Logging.EventId(6, "NameError"), "Query {QueryType} {QueryName} on {Server} attempt {Attempt}: server indicates given name does not exist.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 203public static partial void NameError(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt) 211private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __MalformedResponseCallback = 212global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Warning, new global::Microsoft.Extensions.Logging.EventId(7, "MalformedResponse"), "Query {QueryType} {QueryName} on {Server} attempt {Attempt} failed to return a valid DNS response.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 215public static partial void MalformedResponse(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt) 223private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __NetworkErrorCallback = 224global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Warning, new global::Microsoft.Extensions.Logging.EventId(8, "NetworkError"), "Query {QueryType} {QueryName} on {Server} attempt {Attempt} failed due to a network error.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 227public static partial void NetworkError(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt, global::System.Exception exception) 235private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __QueryErrorCallback = 236global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Error, new global::Microsoft.Extensions.Logging.EventId(9, "QueryError"), "Query {QueryType} {QueryName} on {Server} attempt {Attempt} failed.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 239public static partial void QueryError(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt, global::System.Exception exception)
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)
72return SendQueryWithTelemetry(name, dnsSafeName, QueryType.SRV, ProcessResponse, cancellationToken); 74static (SendQueryError, ServiceResult[]) ProcessResponse(EncodedDomainName dnsSafeName, QueryType queryType, DnsResponse response) 80if (answer.Type == QueryType.SRV) 102if (additional.Name.Equals(target) && (additional.Type == QueryType.A || additional.Type == QueryType.AAAA)) 152var queryType = addressFamily == AddressFamily.InterNetwork ? QueryType.A : QueryType.AAAA; 155static (SendQueryError error, AddressResult[] result) ProcessResponse(EncodedDomainName dnsSafeName, QueryType queryType, DnsResponse response) 178case QueryType.CNAME: 224if (answer.Type == QueryType.CNAME) 284Debug.Assert(record.Type == QueryType.CNAME, "Only CNAME records should be processed here."); 307static bool TryReadAddress(in DnsResourceRecord record, QueryType type, [NotNullWhen(true)] out IPAddress? target) 309Debug.Assert(record.Type is QueryType.A or QueryType.AAAA, "Only CNAME records should be processed here."); 312if (record.Type == QueryType.A && record.Data.Length != IPv4Length || 313record.Type == QueryType.AAAA && record.Data.Length != IPv6Length) 359private async ValueTask<TResult[]> SendQueryWithTelemetry<TResult>(string name, EncodedDomainName dnsSafeName, QueryType queryType, Func<EncodedDomainName, QueryType, DnsResponse, (SendQueryError error, TResult[] result)> processResponseFunc, CancellationToken cancellationToken) 375async ValueTask<(SendQueryError error, TResult[] result)> SendQueryWithRetriesAsync<TResult>(string name, EncodedDomainName dnsSafeName, QueryType queryType, Func<EncodedDomainName, QueryType, DnsResponse, (SendQueryError error, TResult[] result)> processResponseFunc, CancellationToken cancellationToken) 480internal async ValueTask<SendQueryResult> SendQueryToServerWithTimeoutAsync(IPEndPoint serverEndPoint, string name, EncodedDomainName dnsSafeName, QueryType queryType, int attempt, CancellationToken cancellationToken) 512private async ValueTask<SendQueryResult> SendQueryToServerAsync(IPEndPoint serverEndPoint, string name, EncodedDomainName dnsSafeName, QueryType queryType, int attempt, CancellationToken cancellationToken) 559!responseReader.TryReadQuestion(out var qName, out var qType, out var qClass) || 638DnsResourceRecord? soa = authorities.Find(r => r.Type == QueryType.SOA); 672if (!authorities.Exists(r => r.Type == QueryType.NS) && GetNegativeCacheExpiration(createdAt, authorities, out DateTime newExpiration)) 702internal static (DnsDataReader reader, DnsMessageHeader header, SendQueryError sendError) SendDnsQueryCustomTransport(Func<Memory<byte>, int, int> callback, EncodedDomainName dnsSafeName, QueryType queryType) 732internal static async ValueTask<(DnsDataReader reader, DnsMessageHeader header)> SendDnsQueryCoreUdpAsync(IPEndPoint serverEndPoint, EncodedDomainName dnsSafeName, QueryType queryType, CancellationToken cancellationToken) 781internal static async ValueTask<(DnsDataReader reader, DnsMessageHeader header, SendQueryError error)> SendDnsQueryCoreTcpAsync(IPEndPoint serverEndPoint, EncodedDomainName dnsSafeName, QueryType queryType, CancellationToken cancellationToken) 845private 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))