Recommendations AI v1beta1 API - Class ServiceCollectionExtensions (2.0.0-beta04)

public static class ServiceCollectionExtensions

Reference documentation and code samples for the Recommendations AI v1beta1 API class ServiceCollectionExtensions.

Static class to provide extension methods to configure API clients.

Inheritance

object > ServiceCollectionExtensions

Namespace

Microsoft.Extensions.DependencyInjection

Assembly

Google.Cloud.RecommendationEngine.V1Beta1.dll

Methods

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

AddPredictionApiKeyRegistryClient(IServiceCollection, Action<PredictionApiKeyRegistryClientBuilder>)

public static IServiceCollection AddPredictionApiKeyRegistryClient(this IServiceCollection services, Action<PredictionApiKeyRegistryClientBuilder> action = null)

Adds a singleton PredictionApiKeyRegistryClient to services.

Parameters
NameDescription
servicesIServiceCollection

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

actionActionPredictionApiKeyRegistryClientBuilder

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

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