[[["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\u003eThis page provides documentation for the \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e class within the Google Cloud Tasks v2beta3 API, specifically within the \u003ccode\u003eMicrosoft.Extensions.DependencyInjection\u003c/code\u003e namespace.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e class is a static class designed to offer extension methods for configuring API clients.\u003c/p\u003e\n"],["\u003cp\u003eThe page details the methods \u003ccode\u003eAddCloudTasksClient\u003c/code\u003e which adds a singleton \u003ccode\u003eCloudTasksClient\u003c/code\u003e to an \u003ccode\u003eIServiceCollection\u003c/code\u003e, allowing for flexible client configuration, and it has two versions that offer different levels of customization.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation shows previous versions available, with the most recent being 3.0.0-beta07.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Tasks v2beta3 API - Class ServiceCollectionExtensions (3.0.0-beta07)\n\nVersion latestkeyboard_arrow_down\n\n- [3.0.0-beta07 (latest)](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [3.0.0-beta06](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/3.0.0-beta06/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [2.0.0-beta08](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/2.0.0-beta08/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions) \n\n public static class ServiceCollectionExtensions\n\nReference documentation and code samples for the Google Cloud Tasks v2beta3 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.Tasks.V2Beta3/latest/Microsoft.Extensions.DependencyInjection)\n\nAssembly\n--------\n\nGoogle.Cloud.Tasks.V2Beta3.dll\n\nMethods\n-------\n\n### AddCloudTasksClient(IServiceCollection, Action\\\u003cCloudTasksClientBuilder\\\u003e)\n\n public static IServiceCollection AddCloudTasksClient(this IServiceCollection services, Action\u003cCloudTasksClientBuilder\u003e action = null)\n\nAdds a singleton [CloudTasksClient](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.CloudTasksClient) to `services`.\n\n### AddCloudTasksClient(IServiceCollection, Action\\\u003cIServiceProvider, CloudTasksClientBuilder\\\u003e)\n\n public static IServiceCollection AddCloudTasksClient(this IServiceCollection services, Action\u003cIServiceProvider, CloudTasksClientBuilder\u003e action)\n\nAdds a singleton [CloudTasksClient](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.CloudTasksClient) to `services`."]]