[[["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-08-28 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e class for the Cloud IDS v1 API is 2.4.0, with documentation available for versions ranging back to 1.0.0.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e is a static class that provides extension methods to configure API clients, particularly within the \u003ccode\u003eMicrosoft.Extensions.DependencyInjection\u003c/code\u003e namespace.\u003c/p\u003e\n"],["\u003cp\u003eThis class offers methods like \u003ccode\u003eAddIDSClient\u003c/code\u003e to add a singleton \u003ccode\u003eIDSClient\u003c/code\u003e to an \u003ccode\u003eIServiceCollection\u003c/code\u003e, allowing for the configuration of the client using optional actions on an \u003ccode\u003eIDSClientBuilder\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAddIDSClient\u003c/code\u003e methods accept parameters such as \u003ccode\u003eservices\u003c/code\u003e (the \u003ccode\u003eIServiceCollection\u003c/code\u003e) and an optional \u003ccode\u003eaction\u003c/code\u003e to modify the \u003ccode\u003eIDSClientBuilder\u003c/code\u003e before it's used to configure the client.\u003c/p\u003e\n"],["\u003cp\u003eInherited members from the base \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, are also accessible through \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Cloud IDS v1 API - Class ServiceCollectionExtensions (2.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.4.0 (latest)](/dotnet/docs/reference/Google.Cloud.Ids.V1/latest/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Ids.V1/2.3.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Ids.V1/2.2.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Ids.V1/2.1.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Ids.V1/2.0.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Ids.V1/1.0.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions) \n\n public static class ServiceCollectionExtensions\n\nReference documentation and code samples for the Cloud IDS 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.Ids.V1/latest/Microsoft.Extensions.DependencyInjection)\n\nAssembly\n--------\n\nGoogle.Cloud.Ids.V1.dll\n\nMethods\n-------\n\n### AddIDSClient(IServiceCollection, Action\\\u003cIDSClientBuilder\\\u003e)\n\n public static IServiceCollection AddIDSClient(this IServiceCollection services, Action\u003cIDSClientBuilder\u003e action = null)\n\nAdds a singleton [IDSClient](/dotnet/docs/reference/Google.Cloud.Ids.V1/latest/Google.Cloud.Ids.V1.IDSClient) to `services`.\n\n### AddIDSClient(IServiceCollection, Action\\\u003cIServiceProvider, IDSClientBuilder\\\u003e)\n\n public static IServiceCollection AddIDSClient(this IServiceCollection services, Action\u003cIServiceProvider, IDSClientBuilder\u003e action)\n\nAdds a singleton [IDSClient](/dotnet/docs/reference/Google.Cloud.Ids.V1/latest/Google.Cloud.Ids.V1.IDSClient) to `services`."]]