Class ServiceCollectionExtensions
Static class to provide extension methods to configure API clients.
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: Google.Maps.Routing.V2.dll
Syntax
public static class ServiceCollectionExtensions
Methods
AddRoutesClient(IServiceCollection, Action<RoutesClientBuilder>)
Adds a singleton RoutesClient to services
.
Declaration
public static IServiceCollection AddRoutesClient(this IServiceCollection services, Action<RoutesClientBuilder> action = null)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<RoutesClientBuilder> | action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IServiceCollection |
AddRoutesClient(IServiceCollection, Action<IServiceProvider, RoutesClientBuilder>)
Adds a singleton RoutesClient to services
.
Declaration
public static IServiceCollection AddRoutesClient(this IServiceCollection services, Action<IServiceProvider, RoutesClientBuilder> action)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<IServiceProvider, RoutesClientBuilder> | action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IServiceCollection |