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