Class ServiceCollectionExtensions (3.0.0)

public static class ServiceCollectionExtensions

Static class to provide extension methods to configure API clients.

Inheritance

Object > ServiceCollectionExtensions

Namespace

Microsoft.Extensions.DependencyInjection

Assembly

Google.Cloud.Monitoring.V3.dll

Methods

AddAlertPolicyServiceClient(IServiceCollection, Action<AlertPolicyServiceClientBuilder>)

public static IServiceCollection AddAlertPolicyServiceClient(this IServiceCollection services, Action<AlertPolicyServiceClientBuilder> action = null)

Adds a singleton AlertPolicyServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

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

actionAction<AlertPolicyServiceClientBuilder>

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

Returns
TypeDescription
IServiceCollection

AddGroupServiceClient(IServiceCollection, Action<GroupServiceClientBuilder>)

public static IServiceCollection AddGroupServiceClient(this IServiceCollection services, Action<GroupServiceClientBuilder> action = null)

Adds a singleton GroupServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

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

actionAction<GroupServiceClientBuilder>

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

Returns
TypeDescription
IServiceCollection

AddMetricServiceClient(IServiceCollection, Action<MetricServiceClientBuilder>)

public static IServiceCollection AddMetricServiceClient(this IServiceCollection services, Action<MetricServiceClientBuilder> action = null)

Adds a singleton MetricServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

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

actionAction<MetricServiceClientBuilder>

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

Returns
TypeDescription
IServiceCollection

AddNotificationChannelServiceClient(IServiceCollection, Action<NotificationChannelServiceClientBuilder>)

public static IServiceCollection AddNotificationChannelServiceClient(this IServiceCollection services, Action<NotificationChannelServiceClientBuilder> action = null)

Adds a singleton NotificationChannelServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

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

actionAction<NotificationChannelServiceClientBuilder>

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

Returns
TypeDescription
IServiceCollection

AddQueryServiceClient(IServiceCollection, Action<QueryServiceClientBuilder>)

public static IServiceCollection AddQueryServiceClient(this IServiceCollection services, Action<QueryServiceClientBuilder> action = null)

Adds a singleton QueryServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

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

actionAction<QueryServiceClientBuilder>

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

Returns
TypeDescription
IServiceCollection

AddServiceMonitoringServiceClient(IServiceCollection, Action<ServiceMonitoringServiceClientBuilder>)

public static IServiceCollection AddServiceMonitoringServiceClient(this IServiceCollection services, Action<ServiceMonitoringServiceClientBuilder> action = null)

Adds a singleton ServiceMonitoringServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

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

actionAction<ServiceMonitoringServiceClientBuilder>

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

Returns
TypeDescription
IServiceCollection

AddUptimeCheckServiceClient(IServiceCollection, Action<UptimeCheckServiceClientBuilder>)

public static IServiceCollection AddUptimeCheckServiceClient(this IServiceCollection services, Action<UptimeCheckServiceClientBuilder> action = null)

Adds a singleton UptimeCheckServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

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

actionAction<UptimeCheckServiceClientBuilder>

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

Returns
TypeDescription
IServiceCollection