Class ServiceCollectionExtensions (2.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.ResourceManager.V3.dll

Methods

AddFoldersClient(IServiceCollection, Action<FoldersClientBuilder>)

public static IServiceCollection AddFoldersClient(this IServiceCollection services, Action<FoldersClientBuilder> action = null)

Adds a singleton FoldersClient to services.

Parameters
NameDescription
servicesIServiceCollection

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

actionAction<FoldersClientBuilder>

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

Returns
TypeDescription
IServiceCollection

AddOrganizationsClient(IServiceCollection, Action<OrganizationsClientBuilder>)

public static IServiceCollection AddOrganizationsClient(this IServiceCollection services, Action<OrganizationsClientBuilder> action = null)

Adds a singleton OrganizationsClient to services.

Parameters
NameDescription
servicesIServiceCollection

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

actionAction<OrganizationsClientBuilder>

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

Returns
TypeDescription
IServiceCollection

AddProjectsClient(IServiceCollection, Action<ProjectsClientBuilder>)

public static IServiceCollection AddProjectsClient(this IServiceCollection services, Action<ProjectsClientBuilder> action = null)

Adds a singleton ProjectsClient to services.

Parameters
NameDescription
servicesIServiceCollection

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

actionAction<ProjectsClientBuilder>

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

Returns
TypeDescription
IServiceCollection

AddTagBindingsClient(IServiceCollection, Action<TagBindingsClientBuilder>)

public static IServiceCollection AddTagBindingsClient(this IServiceCollection services, Action<TagBindingsClientBuilder> action = null)

Adds a singleton TagBindingsClient to services.

Parameters
NameDescription
servicesIServiceCollection

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

actionAction<TagBindingsClientBuilder>

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

Returns
TypeDescription
IServiceCollection

AddTagKeysClient(IServiceCollection, Action<TagKeysClientBuilder>)

public static IServiceCollection AddTagKeysClient(this IServiceCollection services, Action<TagKeysClientBuilder> action = null)

Adds a singleton TagKeysClient to services.

Parameters
NameDescription
servicesIServiceCollection

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

actionAction<TagKeysClientBuilder>

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

Returns
TypeDescription
IServiceCollection

AddTagValuesClient(IServiceCollection, Action<TagValuesClientBuilder>)

public static IServiceCollection AddTagValuesClient(this IServiceCollection services, Action<TagValuesClientBuilder> action = null)

Adds a singleton TagValuesClient to services.

Parameters
NameDescription
servicesIServiceCollection

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

actionAction<TagValuesClientBuilder>

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

Returns
TypeDescription
IServiceCollection