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