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