TryAppendSingleton(IServiceCollection, Type, Type)

public static IServiceCollection TryAppendSingleton(IServiceCollection collection, Type serviceType, Type implementationType)
Returns:
IServiceCollection

Parameters

collection IServiceCollection
serviceType Type
implementationType Type

TryAppendSingleton<TService, TImplementation>(IServiceCollection)

public static IServiceCollection TryAppendSingleton<TService, TImplementation>(IServiceCollection collection) where TImplementation : TService
Returns:
IServiceCollection

Parameters

collection IServiceCollection

Type Parameters

TService TImplementation TService
In this article