Game Services v1 API - Class ServiceCollectionExtensions (2.1.0)

public static class ServiceCollectionExtensions

Reference documentation and code samples for the Game 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.Gaming.V1.dll

Methods

AddGameServerClustersServiceClient(IServiceCollection, Action<GameServerClustersServiceClientBuilder>)

public static IServiceCollection AddGameServerClustersServiceClient(this IServiceCollection services, Action<GameServerClustersServiceClientBuilder> action = null)

Adds a singleton GameServerClustersServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

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

actionAction<GameServerClustersServiceClientBuilder>

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

Returns
TypeDescription
IServiceCollection

AddGameServerConfigsServiceClient(IServiceCollection, Action<GameServerConfigsServiceClientBuilder>)

public static IServiceCollection AddGameServerConfigsServiceClient(this IServiceCollection services, Action<GameServerConfigsServiceClientBuilder> action = null)

Adds a singleton GameServerConfigsServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

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

actionAction<GameServerConfigsServiceClientBuilder>

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

Returns
TypeDescription
IServiceCollection

AddGameServerDeploymentsServiceClient(IServiceCollection, Action<GameServerDeploymentsServiceClientBuilder>)

public static IServiceCollection AddGameServerDeploymentsServiceClient(this IServiceCollection services, Action<GameServerDeploymentsServiceClientBuilder> action = null)

Adds a singleton GameServerDeploymentsServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

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

actionAction<GameServerDeploymentsServiceClientBuilder>

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

Returns
TypeDescription
IServiceCollection

AddRealmsServiceClient(IServiceCollection, Action<RealmsServiceClientBuilder>)

public static IServiceCollection AddRealmsServiceClient(this IServiceCollection services, Action<RealmsServiceClientBuilder> action = null)

Adds a singleton RealmsServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

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

actionAction<RealmsServiceClientBuilder>

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

Returns
TypeDescription
IServiceCollection