Class ServiceCollectionExtensions
Static class to provide extension methods to configure API clients.
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: Google.Ads.AdManager.V1.dll
Syntax
public static class ServiceCollectionExtensions
Methods
AddAdUnitServiceClient(IServiceCollection, Action<AdUnitServiceClientBuilder>)
Adds a singleton Adservices
.
Declaration
public static IServiceCollection AddAdUnitServiceClient(this IServiceCollection services, Action<AdUnitServiceClientBuilder> action = null)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<Ad |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddAdUnitServiceClient(IServiceCollection, Action<IServiceProvider, AdUnitServiceClientBuilder>)
Adds a singleton Adservices
.
Declaration
public static IServiceCollection AddAdUnitServiceClient(this IServiceCollection services, Action<IServiceProvider, AdUnitServiceClientBuilder> action)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<IService |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddCompanyServiceClient(IServiceCollection, Action<CompanyServiceClientBuilder>)
Adds a singleton Companyservices
.
Declaration
public static IServiceCollection AddCompanyServiceClient(this IServiceCollection services, Action<CompanyServiceClientBuilder> action = null)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<Company |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddCompanyServiceClient(IServiceCollection, Action<IServiceProvider, CompanyServiceClientBuilder>)
Adds a singleton Companyservices
.
Declaration
public static IServiceCollection AddCompanyServiceClient(this IServiceCollection services, Action<IServiceProvider, CompanyServiceClientBuilder> action)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<IService |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddCustomFieldServiceClient(IServiceCollection, Action<CustomFieldServiceClientBuilder>)
Adds a singleton Customservices
.
Declaration
public static IServiceCollection AddCustomFieldServiceClient(this IServiceCollection services, Action<CustomFieldServiceClientBuilder> action = null)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<Custom |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddCustomFieldServiceClient(IServiceCollection, Action<IServiceProvider, CustomFieldServiceClientBuilder>)
Adds a singleton Customservices
.
Declaration
public static IServiceCollection AddCustomFieldServiceClient(this IServiceCollection services, Action<IServiceProvider, CustomFieldServiceClientBuilder> action)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<IService |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddCustomTargetingKeyServiceClient(IServiceCollection, Action<CustomTargetingKeyServiceClientBuilder>)
Adds a singleton Customservices
.
Declaration
public static IServiceCollection AddCustomTargetingKeyServiceClient(this IServiceCollection services, Action<CustomTargetingKeyServiceClientBuilder> action = null)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<Custom |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddCustomTargetingKeyServiceClient(IServiceCollection, Action<IServiceProvider, CustomTargetingKeyServiceClientBuilder>)
Adds a singleton Customservices
.
Declaration
public static IServiceCollection AddCustomTargetingKeyServiceClient(this IServiceCollection services, Action<IServiceProvider, CustomTargetingKeyServiceClientBuilder> action)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<IService |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddCustomTargetingValueServiceClient(IServiceCollection, Action<CustomTargetingValueServiceClientBuilder>)
Adds a singleton Customservices
.
Declaration
public static IServiceCollection AddCustomTargetingValueServiceClient(this IServiceCollection services, Action<CustomTargetingValueServiceClientBuilder> action = null)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<Custom |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddCustomTargetingValueServiceClient(IServiceCollection, Action<IServiceProvider, CustomTargetingValueServiceClientBuilder>)
Adds a singleton Customservices
.
Declaration
public static IServiceCollection AddCustomTargetingValueServiceClient(this IServiceCollection services, Action<IServiceProvider, CustomTargetingValueServiceClientBuilder> action)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<IService |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddEntitySignalsMappingServiceClient(IServiceCollection, Action<EntitySignalsMappingServiceClientBuilder>)
Adds a singleton Entityservices
.
Declaration
public static IServiceCollection AddEntitySignalsMappingServiceClient(this IServiceCollection services, Action<EntitySignalsMappingServiceClientBuilder> action = null)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<Entity |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddEntitySignalsMappingServiceClient(IServiceCollection, Action<IServiceProvider, EntitySignalsMappingServiceClientBuilder>)
Adds a singleton Entityservices
.
Declaration
public static IServiceCollection AddEntitySignalsMappingServiceClient(this IServiceCollection services, Action<IServiceProvider, EntitySignalsMappingServiceClientBuilder> action)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<IService |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddNetworkServiceClient(IServiceCollection, Action<NetworkServiceClientBuilder>)
Adds a singleton Networkservices
.
Declaration
public static IServiceCollection AddNetworkServiceClient(this IServiceCollection services, Action<NetworkServiceClientBuilder> action = null)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<Network |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddNetworkServiceClient(IServiceCollection, Action<IServiceProvider, NetworkServiceClientBuilder>)
Adds a singleton Networkservices
.
Declaration
public static IServiceCollection AddNetworkServiceClient(this IServiceCollection services, Action<IServiceProvider, NetworkServiceClientBuilder> action)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<IService |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddOrderServiceClient(IServiceCollection, Action<OrderServiceClientBuilder>)
Adds a singleton Orderservices
.
Declaration
public static IServiceCollection AddOrderServiceClient(this IServiceCollection services, Action<OrderServiceClientBuilder> action = null)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<Order |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddOrderServiceClient(IServiceCollection, Action<IServiceProvider, OrderServiceClientBuilder>)
Adds a singleton Orderservices
.
Declaration
public static IServiceCollection AddOrderServiceClient(this IServiceCollection services, Action<IServiceProvider, OrderServiceClientBuilder> action)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<IService |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddPlacementServiceClient(IServiceCollection, Action<PlacementServiceClientBuilder>)
Adds a singleton Placementservices
.
Declaration
public static IServiceCollection AddPlacementServiceClient(this IServiceCollection services, Action<PlacementServiceClientBuilder> action = null)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<Placement |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddPlacementServiceClient(IServiceCollection, Action<IServiceProvider, PlacementServiceClientBuilder>)
Adds a singleton Placementservices
.
Declaration
public static IServiceCollection AddPlacementServiceClient(this IServiceCollection services, Action<IServiceProvider, PlacementServiceClientBuilder> action)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<IService |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddReportServiceClient(IServiceCollection, Action<ReportServiceClientBuilder>)
Adds a singleton Reportservices
.
Declaration
public static IServiceCollection AddReportServiceClient(this IServiceCollection services, Action<ReportServiceClientBuilder> action = null)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<Report |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddReportServiceClient(IServiceCollection, Action<IServiceProvider, ReportServiceClientBuilder>)
Adds a singleton Reportservices
.
Declaration
public static IServiceCollection AddReportServiceClient(this IServiceCollection services, Action<IServiceProvider, ReportServiceClientBuilder> action)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<IService |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddRoleServiceClient(IServiceCollection, Action<RoleServiceClientBuilder>)
Adds a singleton Roleservices
.
Declaration
public static IServiceCollection AddRoleServiceClient(this IServiceCollection services, Action<RoleServiceClientBuilder> action = null)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<Role |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddRoleServiceClient(IServiceCollection, Action<IServiceProvider, RoleServiceClientBuilder>)
Adds a singleton Roleservices
.
Declaration
public static IServiceCollection AddRoleServiceClient(this IServiceCollection services, Action<IServiceProvider, RoleServiceClientBuilder> action)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<IService |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddTaxonomyCategoryServiceClient(IServiceCollection, Action<TaxonomyCategoryServiceClientBuilder>)
Adds a singleton Taxonomyservices
.
Declaration
public static IServiceCollection AddTaxonomyCategoryServiceClient(this IServiceCollection services, Action<TaxonomyCategoryServiceClientBuilder> action = null)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<Taxonomy |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddTaxonomyCategoryServiceClient(IServiceCollection, Action<IServiceProvider, TaxonomyCategoryServiceClientBuilder>)
Adds a singleton Taxonomyservices
.
Declaration
public static IServiceCollection AddTaxonomyCategoryServiceClient(this IServiceCollection services, Action<IServiceProvider, TaxonomyCategoryServiceClientBuilder> action)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<IService |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddUserServiceClient(IServiceCollection, Action<UserServiceClientBuilder>)
Adds a singleton Userservices
.
Declaration
public static IServiceCollection AddUserServiceClient(this IServiceCollection services, Action<UserServiceClientBuilder> action = null)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<User |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |
AddUserServiceClient(IServiceCollection, Action<IServiceProvider, UserServiceClientBuilder>)
Adds a singleton Userservices
.
Declaration
public static IServiceCollection AddUserServiceClient(this IServiceCollection services, Action<IServiceProvider, UserServiceClientBuilder> action)
Parameters
Type | Name | Description |
---|---|---|
IService |
services | The service collection to add the client to. The services are used to configure the client when requested. |
Action<IService |
action | An optional action to invoke on the client builder. This is invoked before services from
|
Returns
Type | Description |
---|---|
IService |