TextToSpeechClientBuilderServiceCollectionExtensions.AddTextToSpeechClient Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Överlagringar
| Name | Description |
|---|---|
| AddTextToSpeechClient(IServiceCollection, ITextToSpeechClient, ServiceLifetime) |
Registrerar en singleton ITextToSpeechClient i IServiceCollection. |
| AddTextToSpeechClient(IServiceCollection, Func<IServiceProvider,ITextToSpeechClient>, ServiceLifetime) |
Registrerar en singleton ITextToSpeechClient i IServiceCollection. |
AddTextToSpeechClient(IServiceCollection, ITextToSpeechClient, ServiceLifetime)
Registrerar en singleton ITextToSpeechClient i 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
Parametrar
- serviceCollection
- IServiceCollection
Till IServiceCollection vilken klienten ska läggas till.
- innerClient
- ITextToSpeechClient
Det inre ITextToSpeechClient som representerar den underliggande serverdelen.
- lifetime
- ServiceLifetime
Tjänstens livslängd för klienten. Standardinställningen är Singleton.
Returer
En TextToSpeechClientBuilder som kan användas för att skapa en pipeline runt den inre klienten.
Kommentarer
Klienten är registrerad som en singleton-tjänst.
Gäller för
AddTextToSpeechClient(IServiceCollection, Func<IServiceProvider,ITextToSpeechClient>, ServiceLifetime)
Registrerar en singleton ITextToSpeechClient i 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
Parametrar
- serviceCollection
- IServiceCollection
Till IServiceCollection vilken klienten ska läggas till.
- innerClientFactory
- Func<IServiceProvider,ITextToSpeechClient>
Ett återanrop som skapar det inre ITextToSpeechClient som representerar den underliggande serverdelen.
- lifetime
- ServiceLifetime
Tjänstens livslängd för klienten. Standardinställningen är Singleton.
Returer
En TextToSpeechClientBuilder som kan användas för att skapa en pipeline runt den inre klienten.
Kommentarer
Klienten är registrerad som en singleton-tjänst.