[[["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 extension methods for configuring API clients within the Cloud Private Catalog v1beta1 API.\u003c/p\u003e\n"],["\u003cp\u003eThis class is static and inherits from the base \u003ccode\u003eobject\u003c/code\u003e class, providing access to common 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"],["\u003cp\u003eThe \u003ccode\u003eAddPrivateCatalogClient\u003c/code\u003e method can add a singleton \u003ccode\u003ePrivateCatalogClient\u003c/code\u003e to an \u003ccode\u003eIServiceCollection\u003c/code\u003e, and offers optional configuration through an \u003ccode\u003eAction\u003c/code\u003e delegate for a \u003ccode\u003ePrivateCatalogClientBuilder\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThere are two versions of the method \u003ccode\u003eAddPrivateCatalogClient\u003c/code\u003e: one that takes in an IServiceCollection and an Action of PrivateCatalogClientBuilder, and another that takes in the IServiceCollection and an Action of IServiceProvider and PrivateCatalogClientBuilder.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e class is located within the \u003ccode\u003eMicrosoft.Extensions.DependencyInjection\u003c/code\u003e namespace and is part of the \u003ccode\u003eGoogle.Cloud.PrivateCatalog.V1Beta1.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"]]],[],null,["# Cloud Private Catalog v1beta1 API - Class ServiceCollectionExtensions (2.0.0-beta05)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.0-beta05 (latest)](/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [2.0.0-beta04](/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/2.0.0-beta04/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.0.0-beta02](/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/1.0.0-beta02/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions) \n\n public static class ServiceCollectionExtensions\n\nReference documentation and code samples for the Cloud Private Catalog v1beta1 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.PrivateCatalog.V1Beta1/latest/Microsoft.Extensions.DependencyInjection)\n\nAssembly\n--------\n\nGoogle.Cloud.PrivateCatalog.V1Beta1.dll\n\nMethods\n-------\n\n### AddPrivateCatalogClient(IServiceCollection, Action\\\u003cPrivateCatalogClientBuilder\\\u003e)\n\n public static IServiceCollection AddPrivateCatalogClient(this IServiceCollection services, Action\u003cPrivateCatalogClientBuilder\u003e action = null)\n\nAdds a singleton [PrivateCatalogClient](/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.PrivateCatalogClient) to `services`.\n\n### AddPrivateCatalogClient(IServiceCollection, Action\\\u003cIServiceProvider, PrivateCatalogClientBuilder\\\u003e)\n\n public static IServiceCollection AddPrivateCatalogClient(this IServiceCollection services, Action\u003cIServiceProvider, PrivateCatalogClientBuilder\u003e action)\n\nAdds a singleton [PrivateCatalogClient](/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.PrivateCatalogClient) to `services`."]]