KeyedServiceExtensions.AddTransientNamedService Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Sobrecargas
AddTransientNamedService<TService,TInstance>(IServiceCollection, String) |
Registrar um serviço nomeado transitório |
AddTransientNamedService<TService>(IServiceCollection, String, Func<IServiceProvider,String,TService>) |
Registrar um serviço nomeado transitório |
AddTransientNamedService<TService,TInstance>(IServiceCollection, String)
- Origem:
- KeyedService.cs
Registrar um serviço nomeado transitório
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTransientNamedService<TService,TInstance> (this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, string name) where TService : class where TInstance : class, TService;
static member AddTransientNamedService : Microsoft.Extensions.DependencyInjection.IServiceCollection * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Service : null)
<Extension()>
Public Function AddTransientNamedService(Of TService As Class, TInstance As Class) (collection As IServiceCollection, name As String) As IServiceCollection
Parâmetros de tipo
- TService
- TInstance
Parâmetros
- collection
- IServiceCollection
- name
- String
Retornos
Aplica-se a
AddTransientNamedService<TService>(IServiceCollection, String, Func<IServiceProvider,String,TService>)
- Origem:
- KeyedService.cs
Registrar um serviço nomeado transitório
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTransientNamedService<TService> (this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, string name, Func<IServiceProvider,string,TService> factory) where TService : class;
static member AddTransientNamedService : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Func<IServiceProvider, string, 'Service (requires 'Service : null)> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Service : null)
<Extension()>
Public Function AddTransientNamedService(Of TService As Class) (collection As IServiceCollection, name As String, factory As Func(Of IServiceProvider, String, TService)) As IServiceCollection
Parâmetros de tipo
- TService
Parâmetros
- collection
- IServiceCollection
- name
- String
- factory
- Func<IServiceProvider,String,TService>