ServiceProvider ServiceProvider ServiceProvider Class

Definition

Provides methods to get the service object of a specified type.

public ref class ServiceProvider abstract sealed
public static class ServiceProvider
Public Class ServiceProvider
Inheritance
ServiceProviderServiceProviderServiceProvider

Methods

GetService<T>(IServiceProvider) GetService<T>(IServiceProvider) GetService<T>(IServiceProvider)

Retrieves the service object of the specified type.

GetService<T>(IServiceProvider, Boolean) GetService<T>(IServiceProvider, Boolean) GetService<T>(IServiceProvider, Boolean)

Retrieves the service object of the specified type, and throws an exception if the service is not found.

Applies to