public static class ServiceCollectionExtensionsReference documentation and code samples for the Game Services v1 API class ServiceCollectionExtensions.
Static class to provide extension methods to configure API clients.
Namespace
Microsoft.Extensions.DependencyInjectionAssembly
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 | |
|---|---|
| Name | Description |
services |
IServiceCollectionThe service collection to add the client to. The services are used to configure the client when requested. |
action |
ActionGameServerClustersServiceClientBuilderAn optional action to invoke on the client builder. This is invoked before services from
|
| Returns | |
|---|---|
| Type | Description |
IServiceCollection |
|
AddGameServerConfigsServiceClient(IServiceCollection, Action<GameServerConfigsServiceClientBuilder>)
public static IServiceCollection AddGameServerConfigsServiceClient(this IServiceCollection services, Action<GameServerConfigsServiceClientBuilder> action = null)Adds a singleton GameServerConfigsServiceClient to services.
| Parameters | |
|---|---|
| Name | Description |
services |
IServiceCollectionThe service collection to add the client to. The services are used to configure the client when requested. |
action |
ActionGameServerConfigsServiceClientBuilderAn optional action to invoke on the client builder. This is invoked before services from
|
| Returns | |
|---|---|
| Type | Description |
IServiceCollection |
|
AddGameServerDeploymentsServiceClient(IServiceCollection, Action<GameServerDeploymentsServiceClientBuilder>)
public static IServiceCollection AddGameServerDeploymentsServiceClient(this IServiceCollection services, Action<GameServerDeploymentsServiceClientBuilder> action = null)Adds a singleton GameServerDeploymentsServiceClient to services.
| Parameters | |
|---|---|
| Name | Description |
services |
IServiceCollectionThe service collection to add the client to. The services are used to configure the client when requested. |
action |
ActionGameServerDeploymentsServiceClientBuilderAn optional action to invoke on the client builder. This is invoked before services from
|
| Returns | |
|---|---|
| Type | Description |
IServiceCollection |
|
AddRealmsServiceClient(IServiceCollection, Action<RealmsServiceClientBuilder>)
public static IServiceCollection AddRealmsServiceClient(this IServiceCollection services, Action<RealmsServiceClientBuilder> action = null)Adds a singleton RealmsServiceClient to services.
| Parameters | |
|---|---|
| Name | Description |
services |
IServiceCollectionThe service collection to add the client to. The services are used to configure the client when requested. |
action |
ActionRealmsServiceClientBuilderAn optional action to invoke on the client builder. This is invoked before services from
|
| Returns | |
|---|---|
| Type | Description |
IServiceCollection |
|