Class ServiceCollectionExtensions
Static class to provide extension methods to configure API clients.
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: Google.Shopping.Merchant.DataSources.V1Beta.dll
Syntax
public static class ServiceCollectionExtensions
Methods
AddDataSourcesServiceClient(IServiceCollection, Action<DataSourcesServiceClientBuilder>)
Adds a singleton Dataservices
.
Declaration
public static IServiceCollection AddDataSourcesServiceClient(this IServiceCollection services, Action<DataSourcesServiceClientBuilder> action = null)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<Data |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddDataSourcesServiceClient(IServiceCollection, Action<IServiceProvider, DataSourcesServiceClientBuilder>)
Adds a singleton Dataservices
.
Declaration
public static IServiceCollection AddDataSourcesServiceClient(this IServiceCollection services, Action<IServiceProvider, DataSourcesServiceClientBuilder> action)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<IService |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddFileUploadsServiceClient(IServiceCollection, Action<FileUploadsServiceClientBuilder>)
Adds a singleton Fileservices
.
Declaration
public static IServiceCollection AddFileUploadsServiceClient(this IServiceCollection services, Action<FileUploadsServiceClientBuilder> action = null)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<File |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddFileUploadsServiceClient(IServiceCollection, Action<IServiceProvider, FileUploadsServiceClientBuilder>)
Adds a singleton Fileservices
.
Declaration
public static IServiceCollection AddFileUploadsServiceClient(this IServiceCollection services, Action<IServiceProvider, FileUploadsServiceClientBuilder> action)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<IService |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |