Retail v2 API - Class ServiceCollectionExtensions (2.7.0)

public static class ServiceCollectionExtensions

Reference documentation and code samples for the Retail v2 API class ServiceCollectionExtensions.

Static class to provide extension methods to configure API clients.

Inheritance

object > ServiceCollectionExtensions

Namespace

Microsoft.Extensions.DependencyInjection

Assembly

Google.Cloud.Retail.V2.dll

Methods

AddAnalyticsServiceClient(IServiceCollection, Action<AnalyticsServiceClientBuilder>)

public static IServiceCollection AddAnalyticsServiceClient(this IServiceCollection services, Action<AnalyticsServiceClientBuilder> action = null)

Adds a singleton AnalyticsServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

actionActionAnalyticsServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
TypeDescription
IServiceCollection

AddCatalogServiceClient(IServiceCollection, Action<CatalogServiceClientBuilder>)

public static IServiceCollection AddCatalogServiceClient(this IServiceCollection services, Action<CatalogServiceClientBuilder> action = null)

Adds a singleton CatalogServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

actionActionCatalogServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
TypeDescription
IServiceCollection

AddCompletionServiceClient(IServiceCollection, Action<CompletionServiceClientBuilder>)

public static IServiceCollection AddCompletionServiceClient(this IServiceCollection services, Action<CompletionServiceClientBuilder> action = null)

Adds a singleton CompletionServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

actionActionCompletionServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
TypeDescription
IServiceCollection

AddControlServiceClient(IServiceCollection, Action<ControlServiceClientBuilder>)

public static IServiceCollection AddControlServiceClient(this IServiceCollection services, Action<ControlServiceClientBuilder> action = null)

Adds a singleton ControlServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

actionActionControlServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
TypeDescription
IServiceCollection

AddModelServiceClient(IServiceCollection, Action<ModelServiceClientBuilder>)

public static IServiceCollection AddModelServiceClient(this IServiceCollection services, Action<ModelServiceClientBuilder> action = null)

Adds a singleton ModelServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

actionActionModelServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
TypeDescription
IServiceCollection

AddPredictionServiceClient(IServiceCollection, Action<PredictionServiceClientBuilder>)

public static IServiceCollection AddPredictionServiceClient(this IServiceCollection services, Action<PredictionServiceClientBuilder> action = null)

Adds a singleton PredictionServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

actionActionPredictionServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
TypeDescription
IServiceCollection

AddProductServiceClient(IServiceCollection, Action<ProductServiceClientBuilder>)

public static IServiceCollection AddProductServiceClient(this IServiceCollection services, Action<ProductServiceClientBuilder> action = null)

Adds a singleton ProductServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

actionActionProductServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
TypeDescription
IServiceCollection

AddSearchServiceClient(IServiceCollection, Action<SearchServiceClientBuilder>)

public static IServiceCollection AddSearchServiceClient(this IServiceCollection services, Action<SearchServiceClientBuilder> action = null)

Adds a singleton SearchServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

actionActionSearchServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
TypeDescription
IServiceCollection

AddServingConfigServiceClient(IServiceCollection, Action<ServingConfigServiceClientBuilder>)

public static IServiceCollection AddServingConfigServiceClient(this IServiceCollection services, Action<ServingConfigServiceClientBuilder> action = null)

Adds a singleton ServingConfigServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

actionActionServingConfigServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
TypeDescription
IServiceCollection

AddUserEventServiceClient(IServiceCollection, Action<UserEventServiceClientBuilder>)

public static IServiceCollection AddUserEventServiceClient(this IServiceCollection services, Action<UserEventServiceClientBuilder> action = null)

Adds a singleton UserEventServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

The service collection to add the client to. The services are used to configure the client when requested.

actionActionUserEventServiceClientBuilder

An optional action to invoke on the client builder. This is invoked before services from services are used.

Returns
TypeDescription
IServiceCollection