KeyedServiceExtensions.AddTransientNamedService Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Overload
AddTransientNamedService<TService,TInstance>(IServiceCollection, String) |
Registrare un servizio denominato temporaneo |
AddTransientNamedService<TService>(IServiceCollection, String, Func<IServiceProvider,String,TService>) |
Registrare un servizio denominato temporaneo |
AddTransientNamedService<TService,TInstance>(IServiceCollection, String)
- Origine:
- KeyedService.cs
Registrare un servizio denominato temporaneo
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
Parametri di tipo
- TService
- TInstance
Parametri
- collection
- IServiceCollection
- name
- String
Restituisce
Si applica a
AddTransientNamedService<TService>(IServiceCollection, String, Func<IServiceProvider,String,TService>)
- Origine:
- KeyedService.cs
Registrare un servizio denominato temporaneo
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
Parametri di tipo
- TService
Parametri
- collection
- IServiceCollection
- name
- String
- factory
- Func<IServiceProvider,String,TService>