Method TryAdd
TryAdd<TServiceImplementation>(IServiceCollection, ServiceLifetime)
Declaration
public static void TryAdd<TServiceImplementation>(this IServiceCollection collection, ServiceLifetime lifetime)
Parameters
Type Parameters
Name |
Description |
TServiceImplementation |
|
TryAdd(IServiceCollection, Type, Type, ServiceLifetime)
Declaration
public static void TryAdd(this IServiceCollection collection, Type serviceType, Type serviceImplementation, ServiceLifetime lifetime)
Parameters
TryAdd<TServiceType, TServiceImplementation>(IServiceCollection, ServiceLifetime)
Declaration
public static void TryAdd<TServiceType, TServiceImplementation>(this IServiceCollection collection, ServiceLifetime lifetime) where TServiceImplementation : TServiceType
Parameters
Type Parameters
Name |
Description |
TServiceType |
|
TServiceImplementation |
|