[[["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\u003eThe latest version of the \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e is 2.2.0, with prior versions ranging from 2.1.0 down to 1.1.0, all of which provide access to documentation for the Game Services v1 API.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e is a static class that extends \u003ccode\u003eIServiceCollection\u003c/code\u003e to configure API clients for the Game Services v1 API.\u003c/p\u003e\n"],["\u003cp\u003eThis class provides methods such as \u003ccode\u003eAddGameServerClustersServiceClient\u003c/code\u003e, \u003ccode\u003eAddGameServerConfigsServiceClient\u003c/code\u003e, \u003ccode\u003eAddGameServerDeploymentsServiceClient\u003c/code\u003e, and \u003ccode\u003eAddRealmsServiceClient\u003c/code\u003e to add singleton clients to the service collection.\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 configure the respective client builder, and returns an \u003ccode\u003eIServiceCollection\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e class inherits members from the \u003ccode\u003eobject\u003c/code\u003e class, such as \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,["# Game Services v1 API - Class ServiceCollectionExtensions (2.2.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.2.0 (latest)](/dotnet/docs/reference/Google.Cloud.Gaming.V1/latest/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Gaming.V1/2.1.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Gaming.V1/2.0.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.Gaming.V1/1.4.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.Gaming.V1/1.3.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Gaming.V1/1.2.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Gaming.V1/1.1.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions) \n\n public static class ServiceCollectionExtensions\n\nReference documentation and code samples for the Game Services v1 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.V1/latest/Microsoft.Extensions.DependencyInjection)\n\nAssembly\n--------\n\nGoogle.Cloud.Gaming.V1.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.V1/latest/Google.Cloud.Gaming.V1.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.V1/latest/Google.Cloud.Gaming.V1.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.V1/latest/Google.Cloud.Gaming.V1.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.V1/latest/Google.Cloud.Gaming.V1.RealmsServiceClient) to `services`."]]