[[["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 \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e class provides extension methods for configuring API clients within the Cloud Storage v2 API.\u003c/p\u003e\n"],["\u003cp\u003eIt is a static class that inherits from the base \u003ccode\u003eobject\u003c/code\u003e class, with functionalities to add the client to the services collection.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAddStorageControlClient\u003c/code\u003e method adds a singleton \u003ccode\u003eStorageControlClient\u003c/code\u003e to the \u003ccode\u003eIServiceCollection\u003c/code\u003e, with an option to specify a configuration action using the \u003ccode\u003eStorageControlClientBuilder\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of this api is 1.1.0, with version 1.0.1 also being available.\u003c/p\u003e\n"],["\u003cp\u003eIt uses the \u003ccode\u003eMicrosoft.Extensions.DependencyInjection\u003c/code\u003e namespace and is contained within the \u003ccode\u003eGoogle.Cloud.Storage.Control.V2.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"]]],[],null,["# Cloud Storage v2 API - Class ServiceCollectionExtensions (1.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.4.0 (latest)](/dotnet/docs/reference/Google.Cloud.Storage.Control.V2/latest/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.Storage.Control.V2/1.3.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Storage.Control.V2/1.2.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Storage.Control.V2/1.1.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.0.1](/dotnet/docs/reference/Google.Cloud.Storage.Control.V2/1.0.1/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions) \n\n public static class ServiceCollectionExtensions\n\nReference documentation and code samples for the Cloud Storage v2 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.Storage.Control.V2/latest/Microsoft.Extensions.DependencyInjection)\n\nAssembly\n--------\n\nGoogle.Cloud.Storage.Control.V2.dll\n\nMethods\n-------\n\n### AddStorageControlClient(IServiceCollection, Action\\\u003cStorageControlClientBuilder\\\u003e)\n\n public static IServiceCollection AddStorageControlClient(this IServiceCollection services, Action\u003cStorageControlClientBuilder\u003e action = null)\n\nAdds a singleton [StorageControlClient](/dotnet/docs/reference/Google.Cloud.Storage.Control.V2/latest/Google.Cloud.Storage.Control.V2.StorageControlClient) to `services`.\n\n### AddStorageControlClient(IServiceCollection, Action\\\u003cIServiceProvider, StorageControlClientBuilder\\\u003e)\n\n public static IServiceCollection AddStorageControlClient(this IServiceCollection services, Action\u003cIServiceProvider, StorageControlClientBuilder\u003e action)\n\nAdds a singleton [StorageControlClient](/dotnet/docs/reference/Google.Cloud.Storage.Control.V2/latest/Google.Cloud.Storage.Control.V2.StorageControlClient) to `services`."]]