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