Google Cloud Logging v2 API - Class ServiceCollectionExtensions (4.2.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
NameDescription
servicesIServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

actionActionConfigServiceV2ClientBuilder

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

Returns
TypeDescription
IServiceCollection

AddLoggingServiceV2Client(IServiceCollection, Action<LoggingServiceV2ClientBuilder>)

public static IServiceCollection AddLoggingServiceV2Client(this IServiceCollection services, Action<LoggingServiceV2ClientBuilder> action = null)

Adds a singleton LoggingServiceV2Client to services.

Parameters
NameDescription
servicesIServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

actionActionLoggingServiceV2ClientBuilder

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

Returns
TypeDescription
IServiceCollection

AddMetricsServiceV2Client(IServiceCollection, Action<MetricsServiceV2ClientBuilder>)

public static IServiceCollection AddMetricsServiceV2Client(this IServiceCollection services, Action<MetricsServiceV2ClientBuilder> action = null)

Adds a singleton MetricsServiceV2Client to services.

Parameters
NameDescription
servicesIServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

actionActionMetricsServiceV2ClientBuilder

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

Returns
TypeDescription
IServiceCollection