GetRequiredImplementationInstance<TService>(IServiceCollection) Method
Gets the registered singleton instance for the given type, if and only if an instance was registered. If the registration is factory-based or for a different type, null will be returned.
Namespace
Statiq.Common
Containing Type
IServiceCollectionExtensions

Syntax

public static TService GetRequiredImplementationInstance<TService>(this IServiceCollection serviceCollection) 
    where TService : class

Type Parameters

Name Description
TService

Parameters

Name Type Description
serviceCollection IServiceCollection

Return Value

Type Description
TService