Discovery Engine v1beta API - Class ServiceCollectionExtensions (1.0.0-beta06)

public static class ServiceCollectionExtensions

Reference documentation and code samples for the Discovery Engine v1beta API class ServiceCollectionExtensions.

Static class to provide extension methods to configure API clients.

Inheritance

object > ServiceCollectionExtensions

Namespace

Microsoft.Extensions.DependencyInjection

Assembly

Google.Cloud.DiscoveryEngine.V1Beta.dll

Methods

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

AddDocumentServiceClient(IServiceCollection, Action<DocumentServiceClientBuilder>)

public static IServiceCollection AddDocumentServiceClient(this IServiceCollection services, Action<DocumentServiceClientBuilder> action = null)

Adds a singleton DocumentServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

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

actionActionDocumentServiceClientBuilder

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

Returns
TypeDescription
IServiceCollection

AddRecommendationServiceClient(IServiceCollection, Action<RecommendationServiceClientBuilder>)

public static IServiceCollection AddRecommendationServiceClient(this IServiceCollection services, Action<RecommendationServiceClientBuilder> action = null)

Adds a singleton RecommendationServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

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

actionActionRecommendationServiceClientBuilder

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

Returns
TypeDescription
IServiceCollection

AddSchemaServiceClient(IServiceCollection, Action<SchemaServiceClientBuilder>)

public static IServiceCollection AddSchemaServiceClient(this IServiceCollection services, Action<SchemaServiceClientBuilder> action = null)

Adds a singleton SchemaServiceClient to services.

Parameters
NameDescription
servicesIServiceCollection

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

actionActionSchemaServiceClientBuilder

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

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