ServiceDiscoveryDnsServiceCollectionExtensions.AddDnsSrvServiceEndpointProvider Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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)
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>)
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.