Network Services v1 API - Class ServiceCollectionExtensions (1.0.0-beta01)

public static class ServiceCollectionExtensions

Reference documentation and code samples for the Network Services v1 API class ServiceCollectionExtensions.

Static class to provide extension methods to configure API clients.

Inheritance

object > ServiceCollectionExtensions

Namespace

Microsoft.Extensions.DependencyInjection

Assembly

Google.Cloud.NetworkServices.V1.dll

Methods

AddDepServiceClient(IServiceCollection, Action<DepServiceClientBuilder>)

public static IServiceCollection AddDepServiceClient(this IServiceCollection services, Action<DepServiceClientBuilder> action = null)

Adds a singleton DepServiceClient 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 ActionDepServiceClientBuilder

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

Returns
Type Description
IServiceCollection

AddDepServiceClient(IServiceCollection, Action<IServiceProvider, DepServiceClientBuilder>)

public static IServiceCollection AddDepServiceClient(this IServiceCollection services, Action<IServiceProvider, DepServiceClientBuilder> action)

Adds a singleton DepServiceClient 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 ActionIServiceProviderDepServiceClientBuilder

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

Returns
Type Description
IServiceCollection

AddNetworkServicesClient(IServiceCollection, Action<NetworkServicesClientBuilder>)

public static IServiceCollection AddNetworkServicesClient(this IServiceCollection services, Action<NetworkServicesClientBuilder> action = null)

Adds a singleton NetworkServicesClient 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 ActionNetworkServicesClientBuilder

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

Returns
Type Description
IServiceCollection

AddNetworkServicesClient(IServiceCollection, Action<IServiceProvider, NetworkServicesClientBuilder>)

public static IServiceCollection AddNetworkServicesClient(this IServiceCollection services, Action<IServiceProvider, NetworkServicesClientBuilder> action)

Adds a singleton NetworkServicesClient 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 ActionIServiceProviderNetworkServicesClientBuilder

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

Returns
Type Description
IServiceCollection