TextToSpeechClientBuilderServiceCollectionExtensions.AddKeyedTextToSpeechClient Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Overloads
| Name | Description |
|---|---|
| AddKeyedTextToSpeechClient(IServiceCollection, Object, ITextToSpeechClient, ServiceLifetime) |
Registreert een keyed singleton ITextToSpeechClient in de IServiceCollection. |
| AddKeyedTextToSpeechClient(IServiceCollection, Object, Func<IServiceProvider,ITextToSpeechClient>, ServiceLifetime) |
Registreert een keyed singleton ITextToSpeechClient in de IServiceCollection. |
AddKeyedTextToSpeechClient(IServiceCollection, Object, ITextToSpeechClient, ServiceLifetime)
Registreert een keyed singleton ITextToSpeechClient in de IServiceCollection.
public static Microsoft.Extensions.AI.TextToSpeechClientBuilder AddKeyedTextToSpeechClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection serviceCollection, object? serviceKey, Microsoft.Extensions.AI.ITextToSpeechClient innerClient, Microsoft.Extensions.DependencyInjection.ServiceLifetime lifetime = Microsoft.Extensions.DependencyInjection.ServiceLifetime.Singleton);
static member AddKeyedTextToSpeechClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * obj * Microsoft.Extensions.AI.ITextToSpeechClient * Microsoft.Extensions.DependencyInjection.ServiceLifetime -> Microsoft.Extensions.AI.TextToSpeechClientBuilder
<Extension()>
Public Function AddKeyedTextToSpeechClient (serviceCollection As IServiceCollection, serviceKey As Object, 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.
- serviceKey
- Object
De sleutel waarmee de klant moet worden gekoppeld.
- 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 standaard geregistreerd als een singleton-service.
Van toepassing op
AddKeyedTextToSpeechClient(IServiceCollection, Object, Func<IServiceProvider,ITextToSpeechClient>, ServiceLifetime)
Registreert een keyed singleton ITextToSpeechClient in de IServiceCollection.
public static Microsoft.Extensions.AI.TextToSpeechClientBuilder AddKeyedTextToSpeechClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection serviceCollection, object? serviceKey, Func<IServiceProvider,Microsoft.Extensions.AI.ITextToSpeechClient> innerClientFactory, Microsoft.Extensions.DependencyInjection.ServiceLifetime lifetime = Microsoft.Extensions.DependencyInjection.ServiceLifetime.Singleton);
static member AddKeyedTextToSpeechClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * obj * Func<IServiceProvider, Microsoft.Extensions.AI.ITextToSpeechClient> * Microsoft.Extensions.DependencyInjection.ServiceLifetime -> Microsoft.Extensions.AI.TextToSpeechClientBuilder
<Extension()>
Public Function AddKeyedTextToSpeechClient (serviceCollection As IServiceCollection, serviceKey As Object, 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.
- serviceKey
- Object
De sleutel waarmee de klant moet worden gekoppeld.
- 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 standaard geregistreerd als een singleton-service.