TextToSpeechClientBuilderServiceCollectionExtensions.AddKeyedTextToSpeechClient Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Surcharges
| Nom | Description |
|---|---|
| AddKeyedTextToSpeechClient(IServiceCollection, Object, ITextToSpeechClient, ServiceLifetime) |
Inscrit un singleton ITextToSpeechClient à clé dans le IServiceCollection. |
| AddKeyedTextToSpeechClient(IServiceCollection, Object, Func<IServiceProvider,ITextToSpeechClient>, ServiceLifetime) |
Inscrit un singleton ITextToSpeechClient à clé dans le IServiceCollection. |
AddKeyedTextToSpeechClient(IServiceCollection, Object, ITextToSpeechClient, ServiceLifetime)
Inscrit un singleton ITextToSpeechClient à clé dans le 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
Paramètres
- serviceCollection
- IServiceCollection
IServiceCollection auquel le client doit être ajouté.
- serviceKey
- Object
Clé à laquelle associer le client.
- innerClient
- ITextToSpeechClient
Interne ITextToSpeechClient qui représente le back-end sous-jacent.
- lifetime
- ServiceLifetime
Durée de vie du service pour le client. La valeur par défaut est Singleton.
Retours
Qui TextToSpeechClientBuilder peut être utilisé pour générer un pipeline autour du client interne.
Remarques
Le client est inscrit en tant que service singleton par défaut.
S’applique à
AddKeyedTextToSpeechClient(IServiceCollection, Object, Func<IServiceProvider,ITextToSpeechClient>, ServiceLifetime)
Inscrit un singleton ITextToSpeechClient à clé dans le 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
Paramètres
- serviceCollection
- IServiceCollection
IServiceCollection auquel le client doit être ajouté.
- serviceKey
- Object
Clé à laquelle associer le client.
- innerClientFactory
- Func<IServiceProvider,ITextToSpeechClient>
Rappel qui produit l’intérieur ITextToSpeechClient qui représente le back-end sous-jacent.
- lifetime
- ServiceLifetime
Durée de vie du service pour le client. La valeur par défaut est Singleton.
Retours
Qui TextToSpeechClientBuilder peut être utilisé pour générer un pipeline autour du client interne.
Remarques
Le client est inscrit en tant que service singleton par défaut.