SpeechToTextClientBuilderServiceCollectionExtensions.AddKeyedSpeechToTextClient 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 |
|---|---|
| AddKeyedSpeechToTextClient(IServiceCollection, Object, ISpeechToTextClient, ServiceLifetime) |
Registreert een keyed singleton ISpeechToTextClient in de IServiceCollection. |
| AddKeyedSpeechToTextClient(IServiceCollection, Object, Func<IServiceProvider,ISpeechToTextClient>, ServiceLifetime) |
Registreert een keyed singleton ISpeechToTextClient in de IServiceCollection. |
AddKeyedSpeechToTextClient(IServiceCollection, Object, ISpeechToTextClient, ServiceLifetime)
Registreert een keyed singleton ISpeechToTextClient in de 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
Parameters
- serviceCollection
- IServiceCollection
De IServiceCollection client waaraan de client moet worden toegevoegd.
- serviceKey
- Object
De sleutel waarmee de klant moet worden gekoppeld.
- innerClient
- ISpeechToTextClient
Het binnenste ISpeechToTextClient dat de onderliggende back-end vertegenwoordigt.
- lifetime
- ServiceLifetime
De levensduur van de service voor de client. Wordt standaard ingesteld op Singleton.
Retouren
Een SpeechToTextClientBuilder die kan worden gebruikt om een pijplijn rond de binnenste client te bouwen.
Opmerkingen
De client is geregistreerd als een scoped service.
Van toepassing op
AddKeyedSpeechToTextClient(IServiceCollection, Object, Func<IServiceProvider,ISpeechToTextClient>, ServiceLifetime)
Registreert een keyed singleton ISpeechToTextClient in de 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
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,ISpeechToTextClient>
Een callback die het binnenste ISpeechToTextClient produceert dat de onderliggende back-end vertegenwoordigt.
- lifetime
- ServiceLifetime
De levensduur van de service voor de client. Wordt standaard ingesteld op Singleton.
Retouren
Een SpeechToTextClientBuilder die kan worden gebruikt om een pijplijn rond de binnenste client te bouwen.
Opmerkingen
De client is geregistreerd als een scoped service.