[[["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\u003eThe \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e class provides extension methods for configuring API clients within the Google Cloud BigQuery Data Policy v1 API.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the documentation available is version 1.5.0, while older versions back to 1.0.0 are also accessible.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes two methods for adding a singleton \u003ccode\u003eDataPolicyServiceClient\u003c/code\u003e to an \u003ccode\u003eIServiceCollection\u003c/code\u003e, one with an optional action on the \u003ccode\u003eDataPolicyServiceClientBuilder\u003c/code\u003e, and the other with an optional action that also takes an \u003ccode\u003eIServiceProvider\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe methods \u003ccode\u003eAddDataPolicyServiceClient\u003c/code\u003e allow for customization of the client via an optional action on the \u003ccode\u003eDataPolicyServiceClientBuilder\u003c/code\u003e, and return an \u003ccode\u003eIServiceCollection\u003c/code\u003e type.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e inherits members from the base class \u003ccode\u003eobject\u003c/code\u003e, 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,["# BigQuery Data Policy v1 API - Class ServiceCollectionExtensions (1.5.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.5.0 (latest)](/dotnet/docs/reference/Google.Cloud.BigQuery.DataPolicies.V1/latest/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.BigQuery.DataPolicies.V1/1.4.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.BigQuery.DataPolicies.V1/1.3.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.BigQuery.DataPolicies.V1/1.2.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.BigQuery.DataPolicies.V1/1.1.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.BigQuery.DataPolicies.V1/1.0.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions) \n\n public static class ServiceCollectionExtensions\n\nReference documentation and code samples for the BigQuery Data Policy v1 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.BigQuery.DataPolicies.V1/latest/Microsoft.Extensions.DependencyInjection)\n\nAssembly\n--------\n\nGoogle.Cloud.BigQuery.DataPolicies.V1.dll\n\nMethods\n-------\n\n### AddDataPolicyServiceClient(IServiceCollection, Action\\\u003cDataPolicyServiceClientBuilder\\\u003e)\n\n public static IServiceCollection AddDataPolicyServiceClient(this IServiceCollection services, Action\u003cDataPolicyServiceClientBuilder\u003e action = null)\n\nAdds a singleton [DataPolicyServiceClient](/dotnet/docs/reference/Google.Cloud.BigQuery.DataPolicies.V1/latest/Google.Cloud.BigQuery.DataPolicies.V1.DataPolicyServiceClient) to `services`.\n\n### AddDataPolicyServiceClient(IServiceCollection, Action\\\u003cIServiceProvider, DataPolicyServiceClientBuilder\\\u003e)\n\n public static IServiceCollection AddDataPolicyServiceClient(this IServiceCollection services, Action\u003cIServiceProvider, DataPolicyServiceClientBuilder\u003e action)\n\nAdds a singleton [DataPolicyServiceClient](/dotnet/docs/reference/Google.Cloud.BigQuery.DataPolicies.V1/latest/Google.Cloud.BigQuery.DataPolicies.V1.DataPolicyServiceClient) to `services`."]]