ServiceProviderExtensions Class

Definition

Extension methods for getting services from an IServiceProvider.

public static class ServiceProviderExtensions
type ServiceProviderExtensions = class
Public Module ServiceProviderExtensions
Inheritance
ServiceProviderExtensions

Methods

Name Description
GetClientInfo(IServiceProvider)

Gets the IClientInfo from the IServiceProvider.

GetCommandLineOptions(IServiceProvider)

Gets the command line options from the IServiceProvider.

GetConfiguration(IServiceProvider)

Gets the configuration from the IServiceProvider.

GetLoggerFactory(IServiceProvider)

Gets the logger factory from the IServiceProvider.

GetMessageBus(IServiceProvider)

Gets the message bus from the IServiceProvider.

GetOutputDevice(IServiceProvider)

Gets the output device from the IServiceProvider.

GetRequiredService<TService>(IServiceProvider)

Gets the required service of type TService from the IServiceProvider.

GetService<TService>(IServiceProvider)

Gets the service of type TService from the IServiceProvider.

Applies to