[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThis documentation covers the \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e static class, which provides extension methods for configuring API clients for the Google Cloud for Games v1beta API.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes methods to add singleton service clients for game server clusters, game server configurations, game server deployments, and realms to an \u003ccode\u003eIServiceCollection\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eEach of the \u003ccode\u003eAdd...ServiceClient\u003c/code\u003e methods takes an \u003ccode\u003eIServiceCollection\u003c/code\u003e and an optional \u003ccode\u003eAction\u003c/code\u003e to customize the client builder, giving control on how the client is configured.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version available is 2.0.0-beta03, with 2.0.0-beta02 and 1.0.0-beta09 being older, but also accessible, versions.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e inherits members from \u003ccode\u003eobject\u003c/code\u003e, including \u003ccode\u003eGetHashCode()\u003c/code\u003e, \u003ccode\u003eGetType()\u003c/code\u003e, \u003ccode\u003eMemberwiseClone()\u003c/code\u003e, and \u003ccode\u003eToString()\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Google Cloud for Games v1beta API - Class ServiceCollectionExtensions (2.0.0-beta03)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.0-beta03 (latest)](/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [2.0.0-beta02](/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/2.0.0-beta02/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.0.0-beta09](/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/1.0.0-beta09/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions) \n\n public static class ServiceCollectionExtensions\n\nReference documentation and code samples for the Google Cloud for Games v1beta API class ServiceCollectionExtensions.\n\nStatic class to provide extension methods to configure API clients. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ServiceCollectionExtensions \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Microsoft.Extensions.DependencyInjection](/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Microsoft.Extensions.DependencyInjection)\n\nAssembly\n--------\n\nGoogle.Cloud.Gaming.V1Beta.dll\n\nMethods\n-------\n\n### AddGameServerClustersServiceClient(IServiceCollection, Action\\\u003cGameServerClustersServiceClientBuilder\\\u003e)\n\n public static IServiceCollection AddGameServerClustersServiceClient(this IServiceCollection services, Action\u003cGameServerClustersServiceClientBuilder\u003e action = null)\n\nAdds a singleton [GameServerClustersServiceClient](/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.GameServerClustersServiceClient) to `services`.\n\n### AddGameServerConfigsServiceClient(IServiceCollection, Action\\\u003cGameServerConfigsServiceClientBuilder\\\u003e)\n\n public static IServiceCollection AddGameServerConfigsServiceClient(this IServiceCollection services, Action\u003cGameServerConfigsServiceClientBuilder\u003e action = null)\n\nAdds a singleton [GameServerConfigsServiceClient](/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.GameServerConfigsServiceClient) to `services`.\n\n### AddGameServerDeploymentsServiceClient(IServiceCollection, Action\\\u003cGameServerDeploymentsServiceClientBuilder\\\u003e)\n\n public static IServiceCollection AddGameServerDeploymentsServiceClient(this IServiceCollection services, Action\u003cGameServerDeploymentsServiceClientBuilder\u003e action = null)\n\nAdds a singleton [GameServerDeploymentsServiceClient](/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.GameServerDeploymentsServiceClient) to `services`.\n\n### AddRealmsServiceClient(IServiceCollection, Action\\\u003cRealmsServiceClientBuilder\\\u003e)\n\n public static IServiceCollection AddRealmsServiceClient(this IServiceCollection services, Action\u003cRealmsServiceClientBuilder\u003e action = null)\n\nAdds a singleton [RealmsServiceClient](/dotnet/docs/reference/Google.Cloud.Gaming.V1Beta/latest/Google.Cloud.Gaming.V1Beta.RealmsServiceClient) to `services`."]]