TextToSpeechClientBuilderServiceCollectionExtensions.AddTextToSpeechClient Methode

Definitie

Overloads

AddTextToSpeechClient(IServiceCollection, ITextToSpeechClient, ServiceLifetime)

Bron:
TextToSpeechClientBuilderServiceCollectionExtensions.cs

Registreert een singleton ITextToSpeechClient in de IServiceCollection.

public static Microsoft.Extensions.AI.TextToSpeechClientBuilder AddTextToSpeechClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection serviceCollection, Microsoft.Extensions.AI.ITextToSpeechClient innerClient, Microsoft.Extensions.DependencyInjection.ServiceLifetime lifetime = Microsoft.Extensions.DependencyInjection.ServiceLifetime.Singleton);
static member AddTextToSpeechClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.AI.ITextToSpeechClient * Microsoft.Extensions.DependencyInjection.ServiceLifetime -> Microsoft.Extensions.AI.TextToSpeechClientBuilder
<Extension()>
Public Function AddTextToSpeechClient (serviceCollection As IServiceCollection, innerClient As ITextToSpeechClient, Optional lifetime As ServiceLifetime = Microsoft.Extensions.DependencyInjection.ServiceLifetime.Singleton) As TextToSpeechClientBuilder

Parameters

serviceCollection
IServiceCollection

De IServiceCollection client waaraan de client moet worden toegevoegd.

innerClient
ITextToSpeechClient

Het binnenste ITextToSpeechClient dat de onderliggende back-end vertegenwoordigt.

lifetime
ServiceLifetime

De levensduur van de service voor de client. Wordt standaard ingesteld op Singleton.

Retouren

Een TextToSpeechClientBuilder die kan worden gebruikt om een pijplijn rond de binnenste client te bouwen.

Opmerkingen

De client is geregistreerd als een singleton-service.

Van toepassing op

AddTextToSpeechClient(IServiceCollection, Func<IServiceProvider,ITextToSpeechClient>, ServiceLifetime)

Bron:
TextToSpeechClientBuilderServiceCollectionExtensions.cs

Registreert een singleton ITextToSpeechClient in de IServiceCollection.

public static Microsoft.Extensions.AI.TextToSpeechClientBuilder AddTextToSpeechClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection serviceCollection, Func<IServiceProvider,Microsoft.Extensions.AI.ITextToSpeechClient> innerClientFactory, Microsoft.Extensions.DependencyInjection.ServiceLifetime lifetime = Microsoft.Extensions.DependencyInjection.ServiceLifetime.Singleton);
static member AddTextToSpeechClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * Func<IServiceProvider, Microsoft.Extensions.AI.ITextToSpeechClient> * Microsoft.Extensions.DependencyInjection.ServiceLifetime -> Microsoft.Extensions.AI.TextToSpeechClientBuilder
<Extension()>
Public Function AddTextToSpeechClient (serviceCollection As IServiceCollection, innerClientFactory As Func(Of IServiceProvider, ITextToSpeechClient), Optional lifetime As ServiceLifetime = Microsoft.Extensions.DependencyInjection.ServiceLifetime.Singleton) As TextToSpeechClientBuilder

Parameters

serviceCollection
IServiceCollection

De IServiceCollection client waaraan de client moet worden toegevoegd.

innerClientFactory
Func<IServiceProvider,ITextToSpeechClient>

Een callback die het binnenste ITextToSpeechClient produceert dat de onderliggende back-end vertegenwoordigt.

lifetime
ServiceLifetime

De levensduur van de service voor de client. Wordt standaard ingesteld op Singleton.

Retouren

Een TextToSpeechClientBuilder die kan worden gebruikt om een pijplijn rond de binnenste client te bouwen.

Opmerkingen

De client is geregistreerd als een singleton-service.

Van toepassing op