[[["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 documentation provides reference information for the \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e class within the \u003ccode\u003eGoogle.LongRunning\u003c/code\u003e library, specifically detailing its role in configuring API clients.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e class is a static class that offers extension methods for configuring API clients and is part of the \u003ccode\u003eMicrosoft.Extensions.DependencyInjection\u003c/code\u003e namespace.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation covers the class's inherited members, including \u003ccode\u003eGetHashCode()\u003c/code\u003e, \u003ccode\u003eGetType()\u003c/code\u003e, \u003ccode\u003eMemberwiseClone()\u003c/code\u003e, and \u003ccode\u003eToString()\u003c/code\u003e, all inherited from the base \u003ccode\u003eobject\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides two \u003ccode\u003eAddOperationsClient\u003c/code\u003e methods, which add a singleton \u003ccode\u003eOperationsClient\u003c/code\u003e to an \u003ccode\u003eIServiceCollection\u003c/code\u003e, allowing for optional actions to be invoked on the \u003ccode\u003eOperationsClientBuilder\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of \u003ccode\u003eGoogle.LongRunning\u003c/code\u003e library is \u003ccode\u003e3.3.0\u003c/code\u003e, with prior versions documented going as far back as \u003ccode\u003e2.2.0\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Google.LongRunning - Class ServiceCollectionExtensions (3.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.3.0 (latest)](/dotnet/docs/reference/Google.LongRunning/latest/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [3.2.0](/dotnet/docs/reference/Google.LongRunning/3.2.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [3.1.0](/dotnet/docs/reference/Google.LongRunning/3.1.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [3.0.0](/dotnet/docs/reference/Google.LongRunning/3.0.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [2.3.0](/dotnet/docs/reference/Google.LongRunning/2.3.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [2.2.0](/dotnet/docs/reference/Google.LongRunning/2.2.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions) \n\n public static class ServiceCollectionExtensions\n\nReference documentation and code samples for the Google.LongRunning 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.LongRunning/latest/Microsoft.Extensions.DependencyInjection)\n\nAssembly\n--------\n\nGoogle.LongRunning.dll\n\nMethods\n-------\n\n### AddOperationsClient(IServiceCollection, Action\\\u003cOperationsClientBuilder\\\u003e)\n\n public static IServiceCollection AddOperationsClient(this IServiceCollection services, Action\u003cOperationsClientBuilder\u003e action = null)\n\nAdds a singleton [OperationsClient](/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient) to `services`.\n\n### AddOperationsClient(IServiceCollection, Action\\\u003cIServiceProvider, OperationsClientBuilder\\\u003e)\n\n public static IServiceCollection AddOperationsClient(this IServiceCollection services, Action\u003cIServiceProvider, OperationsClientBuilder\u003e action)\n\nAdds a singleton [OperationsClient](/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient) to `services`."]]