Class ServiceCollectionExtensions
Static class to provide extension methods to configure API clients.
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: Google.Shopping.Merchant.Inventories.V1Beta.dll
Syntax
public static class ServiceCollectionExtensions
Methods
AddLocalInventoryServiceClient(IServiceCollection, Action<LocalInventoryServiceClientBuilder>)
Adds a singleton LocalInventoryServiceClient to services
.
Declaration
public static IServiceCollection AddLocalInventoryServiceClient(this IServiceCollection services, Action<LocalInventoryServiceClientBuilder> 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<LocalInventoryServiceClientBuilder> | action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IServiceCollection |
AddLocalInventoryServiceClient(IServiceCollection, Action<IServiceProvider, LocalInventoryServiceClientBuilder>)
Adds a singleton LocalInventoryServiceClient to services
.
Declaration
public static IServiceCollection AddLocalInventoryServiceClient(this IServiceCollection services, Action<IServiceProvider, LocalInventoryServiceClientBuilder> 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, LocalInventoryServiceClientBuilder> | action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IServiceCollection |
AddRegionalInventoryServiceClient(IServiceCollection, Action<RegionalInventoryServiceClientBuilder>)
Adds a singleton RegionalInventoryServiceClient to services
.
Declaration
public static IServiceCollection AddRegionalInventoryServiceClient(this IServiceCollection services, Action<RegionalInventoryServiceClientBuilder> 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<RegionalInventoryServiceClientBuilder> | action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IServiceCollection |
AddRegionalInventoryServiceClient(IServiceCollection, Action<IServiceProvider, RegionalInventoryServiceClientBuilder>)
Adds a singleton RegionalInventoryServiceClient to services
.
Declaration
public static IServiceCollection AddRegionalInventoryServiceClient(this IServiceCollection services, Action<IServiceProvider, RegionalInventoryServiceClientBuilder> 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, RegionalInventoryServiceClientBuilder> | action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IServiceCollection |