Google Cloud Logging v2 API - Class ServiceCollectionExtensions (4.3.0)

public static class ServiceCollectionExtensions

Reference documentation and code samples for the Google Cloud Logging v2 API class ServiceCollectionExtensions.

Static class to provide extension methods to configure API clients.

Inheritance

object > ServiceCollectionExtensions

Namespace

Microsoft.Extensions.DependencyInjection

Assembly

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 ActionConfigServiceV2ClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

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 ActionLoggingServiceV2ClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

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 ActionMetricsServiceV2ClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
Type Description
IServiceCollection