public static class ServiceCollectionExtensionsReference documentation and code samples for the Google Cloud Logging v2 API 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 |
IServiceCollectionThe service collection to add the client to. The services are used to configure the client when requested. |
action |
ActionConfigServiceV2ClientBuilderAn optional action to invoke on the client builder. This is invoked before services from
|
| Returns | |
|---|---|
| Type | Description |
IServiceCollection |
|
AddConfigServiceV2Client(IServiceCollection, Action<IServiceProvider, ConfigServiceV2ClientBuilder>)
public static IServiceCollection AddConfigServiceV2Client(this IServiceCollection services, Action<IServiceProvider, ConfigServiceV2ClientBuilder> action)Adds a singleton ConfigServiceV2Client to services.
| Parameters | |
|---|---|
| Name | Description |
services |
IServiceCollectionThe service collection to add the client to. The services are used to configure the client when requested. |
action |
ActionIServiceProviderConfigServiceV2ClientBuilderAn 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 |
IServiceCollectionThe service collection to add the client to. The services are used to configure the client when requested. |
action |
ActionLoggingServiceV2ClientBuilderAn optional action to invoke on the client builder. This is invoked before services from
|
| Returns | |
|---|---|
| Type | Description |
IServiceCollection |
|
AddLoggingServiceV2Client(IServiceCollection, Action<IServiceProvider, LoggingServiceV2ClientBuilder>)
public static IServiceCollection AddLoggingServiceV2Client(this IServiceCollection services, Action<IServiceProvider, LoggingServiceV2ClientBuilder> action)Adds a singleton LoggingServiceV2Client to services.
| Parameters | |
|---|---|
| Name | Description |
services |
IServiceCollectionThe service collection to add the client to. The services are used to configure the client when requested. |
action |
ActionIServiceProviderLoggingServiceV2ClientBuilderAn 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 |
IServiceCollectionThe service collection to add the client to. The services are used to configure the client when requested. |
action |
ActionMetricsServiceV2ClientBuilderAn optional action to invoke on the client builder. This is invoked before services from
|
| Returns | |
|---|---|
| Type | Description |
IServiceCollection |
|
AddMetricsServiceV2Client(IServiceCollection, Action<IServiceProvider, MetricsServiceV2ClientBuilder>)
public static IServiceCollection AddMetricsServiceV2Client(this IServiceCollection services, Action<IServiceProvider, MetricsServiceV2ClientBuilder> action)Adds a singleton MetricsServiceV2Client to services.
| Parameters | |
|---|---|
| Name | Description |
services |
IServiceCollectionThe service collection to add the client to. The services are used to configure the client when requested. |
action |
ActionIServiceProviderMetricsServiceV2ClientBuilderAn optional action to invoke on the client builder. This is invoked before services from
|
| Returns | |
|---|---|
| Type | Description |
IServiceCollection |
|