SpeechToTextClientBuilderServiceCollectionExtensions.AddKeyedSpeechToTextClient Metodo

Definizione

Overload

AddKeyedSpeechToTextClient(IServiceCollection, Object, ISpeechToTextClient, ServiceLifetime)

Origine:
SpeechToTextClientBuilderServiceCollectionExtensions.cs

Registra un singleton ISpeechToTextClient con chiave nell'oggetto IServiceCollection.

public static Microsoft.Extensions.AI.SpeechToTextClientBuilder AddKeyedSpeechToTextClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection serviceCollection, object? serviceKey, Microsoft.Extensions.AI.ISpeechToTextClient innerClient, Microsoft.Extensions.DependencyInjection.ServiceLifetime lifetime = Microsoft.Extensions.DependencyInjection.ServiceLifetime.Singleton);
static member AddKeyedSpeechToTextClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * obj * Microsoft.Extensions.AI.ISpeechToTextClient * Microsoft.Extensions.DependencyInjection.ServiceLifetime -> Microsoft.Extensions.AI.SpeechToTextClientBuilder
<Extension()>
Public Function AddKeyedSpeechToTextClient (serviceCollection As IServiceCollection, serviceKey As Object, innerClient As ISpeechToTextClient, Optional lifetime As ServiceLifetime = Microsoft.Extensions.DependencyInjection.ServiceLifetime.Singleton) As SpeechToTextClientBuilder

Parametri

serviceCollection
IServiceCollection

Oggetto IServiceCollection al quale deve essere aggiunto il client.

serviceKey
Object

Chiave con cui associare il client.

innerClient
ISpeechToTextClient

Oggetto interno ISpeechToTextClient che rappresenta il back-end sottostante.

lifetime
ServiceLifetime

Durata del servizio per il client. Di default è Singleton.

Valori restituiti

Oggetto SpeechToTextClientBuilder che può essere usato per compilare una pipeline intorno al client interno.

Commenti

Il client viene registrato come servizio con ambito.

Si applica a

AddKeyedSpeechToTextClient(IServiceCollection, Object, Func<IServiceProvider,ISpeechToTextClient>, ServiceLifetime)

Origine:
SpeechToTextClientBuilderServiceCollectionExtensions.cs

Registra un singleton ISpeechToTextClient con chiave nell'oggetto IServiceCollection.

public static Microsoft.Extensions.AI.SpeechToTextClientBuilder AddKeyedSpeechToTextClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection serviceCollection, object? serviceKey, Func<IServiceProvider,Microsoft.Extensions.AI.ISpeechToTextClient> innerClientFactory, Microsoft.Extensions.DependencyInjection.ServiceLifetime lifetime = Microsoft.Extensions.DependencyInjection.ServiceLifetime.Singleton);
static member AddKeyedSpeechToTextClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * obj * Func<IServiceProvider, Microsoft.Extensions.AI.ISpeechToTextClient> * Microsoft.Extensions.DependencyInjection.ServiceLifetime -> Microsoft.Extensions.AI.SpeechToTextClientBuilder
<Extension()>
Public Function AddKeyedSpeechToTextClient (serviceCollection As IServiceCollection, serviceKey As Object, innerClientFactory As Func(Of IServiceProvider, ISpeechToTextClient), Optional lifetime As ServiceLifetime = Microsoft.Extensions.DependencyInjection.ServiceLifetime.Singleton) As SpeechToTextClientBuilder

Parametri

serviceCollection
IServiceCollection

Oggetto IServiceCollection al quale deve essere aggiunto il client.

serviceKey
Object

Chiave con cui associare il client.

innerClientFactory
Func<IServiceProvider,ISpeechToTextClient>

Callback che produce l'oggetto interno ISpeechToTextClient che rappresenta il back-end sottostante.

lifetime
ServiceLifetime

Durata del servizio per il client. Di default è Singleton.

Valori restituiti

Oggetto SpeechToTextClientBuilder che può essere usato per compilare una pipeline intorno al client interno.

Commenti

Il client viene registrato come servizio con ambito.

Si applica a