ServiceCollectionMap.TryAddTransient Metoda
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Přetížení
| Název | Description |
|---|---|
| TryAddTransient(Type, Func<IServiceProvider,Object>) |
Transient Přidá službu implementovanou danou továrnou, pokud už není zaregistrovaná žádná služba pro daný typ služby. |
| TryAddTransient(Type, Type) |
Transient Přidá službu implementovanou daným konkrétním typem, pokud již nebyla zaregistrována žádná služba pro daný typ služby. |
| TryAddTransient<TService,TImplementation>(Func<IServiceProvider,TImplementation>) |
Transient Přidá službu implementovanou danou továrnou, pokud už není zaregistrovaná žádná služba pro daný typ služby. |
| TryAddTransient<TService,TImplementation>() |
Transient Přidá službu implementovanou daným konkrétním typem, pokud již nebyla zaregistrována žádná služba pro daný typ služby. |
| TryAddTransient<TService>(Func<IServiceProvider,TService>) |
Transient Přidá službu implementovanou danou továrnou, pokud už není zaregistrovaná žádná služba pro daný typ služby. |
TryAddTransient(Type, Func<IServiceProvider,Object>)
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
Transient Přidá službu implementovanou danou továrnou, pokud už není zaregistrovaná žádná služba pro daný typ služby.
public virtual Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap TryAddTransient(Type serviceType, Func<IServiceProvider,object> factory);
abstract member TryAddTransient : Type * Func<IServiceProvider, obj> -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap
override this.TryAddTransient : Type * Func<IServiceProvider, obj> -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap
Public Overridable Function TryAddTransient (serviceType As Type, factory As Func(Of IServiceProvider, Object)) As ServiceCollectionMap
Parametry
- serviceType
- Type
Smlouva o službě.
- factory
- Func<IServiceProvider,Object>
Objekt pro vytváření, který službu implementuje.
Návraty
Mapa tak, aby další volání bylo možné zřetězit.
Platí pro
TryAddTransient(Type, Type)
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
Transient Přidá službu implementovanou daným konkrétním typem, pokud již nebyla zaregistrována žádná služba pro daný typ služby.
public virtual Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap TryAddTransient(Type serviceType, Type implementationType);
abstract member TryAddTransient : Type * Type -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap
override this.TryAddTransient : Type * Type -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap
Public Overridable Function TryAddTransient (serviceType As Type, implementationType As Type) As ServiceCollectionMap
Parametry
- serviceType
- Type
Smlouva o službě.
- implementationType
- Type
Konkrétní typ, který implementuje službu.
Návraty
Mapa tak, aby další volání bylo možné zřetězit.
Platí pro
TryAddTransient<TService,TImplementation>(Func<IServiceProvider,TImplementation>)
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
Transient Přidá službu implementovanou danou továrnou, pokud už není zaregistrovaná žádná služba pro daný typ služby.
public virtual Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap TryAddTransient<TService,TImplementation>(Func<IServiceProvider,TImplementation> factory) where TService : class where TImplementation : class, TService;
abstract member TryAddTransient : Func<IServiceProvider, #'Service> -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap (requires 'Service : null)
override this.TryAddTransient : Func<IServiceProvider, #'Service> -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap (requires 'Service : null)
Public Overridable Function TryAddTransient(Of TService As Class, TImplementation As Class) (factory As Func(Of IServiceProvider, TImplementation)) As ServiceCollectionMap
Parametry typu
- TService
Smlouva o službě.
- TImplementation
Konkrétní typ, který daná továrna vytvoří.
Parametry
- factory
- Func<IServiceProvider,TImplementation>
Objekt pro vytváření, který službu implementuje.
Návraty
Mapa tak, aby další volání bylo možné zřetězit.
Platí pro
TryAddTransient<TService,TImplementation>()
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
Transient Přidá službu implementovanou daným konkrétním typem, pokud již nebyla zaregistrována žádná služba pro daný typ služby.
public virtual Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap TryAddTransient<TService,TImplementation>() where TService : class where TImplementation : class, TService;
abstract member TryAddTransient : unit -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap (requires 'Service : null)
override this.TryAddTransient : unit -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap (requires 'Service : null)
Public Overridable Function TryAddTransient(Of TService As Class, TImplementation As Class) () As ServiceCollectionMap
Parametry typu
- TService
Smlouva o službě.
- TImplementation
Konkrétní typ, který implementuje službu.
Návraty
Mapa tak, aby další volání bylo možné zřetězit.
Platí pro
TryAddTransient<TService>(Func<IServiceProvider,TService>)
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
- Zdroj:
- ServiceCollectionMap.cs
Transient Přidá službu implementovanou danou továrnou, pokud už není zaregistrovaná žádná služba pro daný typ služby.
public virtual Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap TryAddTransient<TService>(Func<IServiceProvider,TService> factory) where TService : class;
abstract member TryAddTransient : Func<IServiceProvider, 'Service (requires 'Service : null)> -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap (requires 'Service : null)
override this.TryAddTransient : Func<IServiceProvider, 'Service (requires 'Service : null)> -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap (requires 'Service : null)
Public Overridable Function TryAddTransient(Of TService As Class) (factory As Func(Of IServiceProvider, TService)) As ServiceCollectionMap
Parametry typu
- TService
Smlouva o službě.
Parametry
- factory
- Func<IServiceProvider,TService>
Objekt pro vytváření, který službu implementuje.
Návraty
Mapa tak, aby další volání bylo možné zřetězit.