IServiceProvider.GetService

IServiceProvider.GetService<TService> method

Gets a service object of the specified type.

public TService GetService<TService>()
    where TService : class, IService
ParameterDescription
TServiceThe type of the service.

Return Value

The service object

See Also