Share via


ServiceDiscoveryDnsServiceCollectionExtensions.AddDnsSrvServiceEndpointProvider Method

Definition

Overloads

AddDnsSrvServiceEndpointProvider(IServiceCollection)

Adds DNS SRV service discovery to the IServiceCollection.

AddDnsSrvServiceEndpointProvider(IServiceCollection, Action<DnsSrvServiceEndpointProviderOptions>)

Adds DNS SRV service discovery to the IServiceCollection.

AddDnsSrvServiceEndpointProvider(IServiceCollection)

Source:
ServiceDiscoveryDnsServiceCollectionExtensions.cs
Source:
ServiceDiscoveryDnsServiceCollectionExtensions.cs

Adds DNS SRV service discovery to the IServiceCollection.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddDnsSrvServiceEndpointProvider (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddDnsSrvServiceEndpointProvider : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddDnsSrvServiceEndpointProvider (services As IServiceCollection) As IServiceCollection

Parameters

services
IServiceCollection

The service collection.

Returns

The provided IServiceCollection.

Remarks

DNS SRV queries are able to provide port numbers for endpoints and can support multiple named endpoints per service. However, not all environment support DNS SRV queries, and in some environments, additional configuration may be required.

Applies to

AddDnsSrvServiceEndpointProvider(IServiceCollection, Action<DnsSrvServiceEndpointProviderOptions>)

Source:
ServiceDiscoveryDnsServiceCollectionExtensions.cs
Source:
ServiceDiscoveryDnsServiceCollectionExtensions.cs

Adds DNS SRV service discovery to the IServiceCollection.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddDnsSrvServiceEndpointProvider (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.ServiceDiscovery.Dns.DnsSrvServiceEndpointProviderOptions> configureOptions);
static member AddDnsSrvServiceEndpointProvider : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Extensions.ServiceDiscovery.Dns.DnsSrvServiceEndpointProviderOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddDnsSrvServiceEndpointProvider (services As IServiceCollection, configureOptions As Action(Of DnsSrvServiceEndpointProviderOptions)) As IServiceCollection

Parameters

services
IServiceCollection

The service collection.

configureOptions
Action<DnsSrvServiceEndpointProviderOptions>

The DNS SRV service discovery configuration options.

Returns

The provided IServiceCollection.

Remarks

DNS SRV queries are able to provide port numbers for endpoints and can support multiple named endpoints per service. However, not all environment support DNS SRV queries, and in some environments, additional configuration may be required.

Applies to