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