[[["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\u003eThis documentation covers the \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e class, which provides extension methods for configuring API clients within the Cloud Document AI v1beta3 API.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e class allows adding singleton \u003ccode\u003eDocumentProcessorServiceClient\u003c/code\u003e and \u003ccode\u003eDocumentServiceClient\u003c/code\u003e instances to an \u003ccode\u003eIServiceCollection\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThere are two overloads available for both \u003ccode\u003eAddDocumentProcessorServiceClient\u003c/code\u003e and \u003ccode\u003eAddDocumentServiceClient\u003c/code\u003e, each offering optional actions to configure the client builder either with or without access to an \u003ccode\u003eIServiceProvider\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAll methods return the \u003ccode\u003eIServiceCollection\u003c/code\u003e after adding the respective service client, allowing for method chaining.\u003c/p\u003e\n"],["\u003cp\u003eThe class inherits from the base \u003ccode\u003eobject\u003c/code\u003e class, incorporating standard object methods such as \u003ccode\u003eGetHashCode\u003c/code\u003e, \u003ccode\u003eGetType\u003c/code\u003e, \u003ccode\u003eMemberwiseClone\u003c/code\u003e, and \u003ccode\u003eToString\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Cloud Document AI v1beta3 API - Class ServiceCollectionExtensions (2.0.0-beta26)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.0-beta26 (latest)](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [2.0.0-beta25](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/2.0.0-beta25/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.0.0-beta04](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/1.0.0-beta04/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions) \n\n public static class ServiceCollectionExtensions\n\nReference documentation and code samples for the Cloud Document AI v1beta3 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.DocumentAI.V1Beta3/latest/Microsoft.Extensions.DependencyInjection)\n\nAssembly\n--------\n\nGoogle.Cloud.DocumentAI.V1Beta3.dll\n\nMethods\n-------\n\n### AddDocumentProcessorServiceClient(IServiceCollection, Action\\\u003cDocumentProcessorServiceClientBuilder\\\u003e)\n\n public static IServiceCollection AddDocumentProcessorServiceClient(this IServiceCollection services, Action\u003cDocumentProcessorServiceClientBuilder\u003e action = null)\n\nAdds a singleton [DocumentProcessorServiceClient](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.DocumentProcessorServiceClient) to `services`.\n\n### AddDocumentProcessorServiceClient(IServiceCollection, Action\\\u003cIServiceProvider, DocumentProcessorServiceClientBuilder\\\u003e)\n\n public static IServiceCollection AddDocumentProcessorServiceClient(this IServiceCollection services, Action\u003cIServiceProvider, DocumentProcessorServiceClientBuilder\u003e action)\n\nAdds a singleton [DocumentProcessorServiceClient](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.DocumentProcessorServiceClient) to `services`.\n\n### AddDocumentServiceClient(IServiceCollection, Action\\\u003cDocumentServiceClientBuilder\\\u003e)\n\n public static IServiceCollection AddDocumentServiceClient(this IServiceCollection services, Action\u003cDocumentServiceClientBuilder\u003e action = null)\n\nAdds a singleton [DocumentServiceClient](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.DocumentServiceClient) to `services`.\n\n### AddDocumentServiceClient(IServiceCollection, Action\\\u003cIServiceProvider, DocumentServiceClientBuilder\\\u003e)\n\n public static IServiceCollection AddDocumentServiceClient(this IServiceCollection services, Action\u003cIServiceProvider, DocumentServiceClientBuilder\u003e action)\n\nAdds a singleton [DocumentServiceClient](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.DocumentServiceClient) to `services`."]]