public static class ServiceCollectionExtensions
Static class to provide extension methods to configure API clients.
Namespace
Microsoft.Extensions.DependencyInjectionAssembly
Google.Cloud.Logging.V2.dll
Methods
AddConfigServiceV2Client(IServiceCollection, Action<ConfigServiceV2ClientBuilder>)
public static IServiceCollection AddConfigServiceV2Client(this IServiceCollection services, Action<ConfigServiceV2ClientBuilder> action = null)
Adds a singleton ConfigServiceV2Client to services
.
Parameters | |
---|---|
Name | Description |
services | IServiceCollection The service collection to add the client to. The services are used to configure the client when requested. |
action | Action<ConfigServiceV2ClientBuilder> An optional action to invoke on the client builder. This is invoked before services from
|
Returns | |
---|---|
Type | Description |
IServiceCollection |
AddLoggingServiceV2Client(IServiceCollection, Action<LoggingServiceV2ClientBuilder>)
public static IServiceCollection AddLoggingServiceV2Client(this IServiceCollection services, Action<LoggingServiceV2ClientBuilder> action = null)
Adds a singleton LoggingServiceV2Client to services
.
Parameters | |
---|---|
Name | Description |
services | IServiceCollection The service collection to add the client to. The services are used to configure the client when requested. |
action | Action<LoggingServiceV2ClientBuilder> An optional action to invoke on the client builder. This is invoked before services from
|
Returns | |
---|---|
Type | Description |
IServiceCollection |
AddMetricsServiceV2Client(IServiceCollection, Action<MetricsServiceV2ClientBuilder>)
public static IServiceCollection AddMetricsServiceV2Client(this IServiceCollection services, Action<MetricsServiceV2ClientBuilder> action = null)
Adds a singleton MetricsServiceV2Client to services
.
Parameters | |
---|---|
Name | Description |
services | IServiceCollection The service collection to add the client to. The services are used to configure the client when requested. |
action | Action<MetricsServiceV2ClientBuilder> An optional action to invoke on the client builder. This is invoked before services from
|
Returns | |
---|---|
Type | Description |
IServiceCollection |