[[["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-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e class provides static extension methods for configuring API clients within the Cloud Natural Language v2 API.\u003c/p\u003e\n"],["\u003cp\u003eIt's part of the \u003ccode\u003eMicrosoft.Extensions.DependencyInjection\u003c/code\u003e namespace within the \u003ccode\u003eGoogle.Cloud.Language.V2.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes methods like \u003ccode\u003eAddLanguageServiceClient\u003c/code\u003e for adding a singleton \u003ccode\u003eLanguageServiceClient\u003c/code\u003e to an \u003ccode\u003eIServiceCollection\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eAddLanguageServiceClient\u003c/code\u003e accepts parameters like an \u003ccode\u003eIServiceCollection\u003c/code\u003e and an optional \u003ccode\u003eAction\u003c/code\u003e to configure a \u003ccode\u003eLanguageServiceClientBuilder\u003c/code\u003e before services are utilized.\u003c/p\u003e\n"],["\u003cp\u003eThe available versions for this class include 1.0.0-beta05 as the latest, and 1.0.0-beta04.\u003c/p\u003e\n"]]],[],null,["# Cloud Natural Language v2 API - Class ServiceCollectionExtensions (1.0.0-beta05)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta05 (latest)](/dotnet/docs/reference/Google.Cloud.Language.V2/latest/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.0.0-beta04](/dotnet/docs/reference/Google.Cloud.Language.V2/1.0.0-beta04/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions) \n\n public static class ServiceCollectionExtensions\n\nReference documentation and code samples for the Cloud Natural Language 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.Language.V2/latest/Microsoft.Extensions.DependencyInjection)\n\nAssembly\n--------\n\nGoogle.Cloud.Language.V2.dll\n\nMethods\n-------\n\n### AddLanguageServiceClient(IServiceCollection, Action\\\u003cLanguageServiceClientBuilder\\\u003e)\n\n public static IServiceCollection AddLanguageServiceClient(this IServiceCollection services, Action\u003cLanguageServiceClientBuilder\u003e action = null)\n\nAdds a singleton [LanguageServiceClient](/dotnet/docs/reference/Google.Cloud.Language.V2/latest/Google.Cloud.Language.V2.LanguageServiceClient) to `services`.\n\n### AddLanguageServiceClient(IServiceCollection, Action\\\u003cIServiceProvider, LanguageServiceClientBuilder\\\u003e)\n\n public static IServiceCollection AddLanguageServiceClient(this IServiceCollection services, Action\u003cIServiceProvider, LanguageServiceClientBuilder\u003e action)\n\nAdds a singleton [LanguageServiceClient](/dotnet/docs/reference/Google.Cloud.Language.V2/latest/Google.Cloud.Language.V2.LanguageServiceClient) to `services`."]]