Język

ISupportRequiredService.GetRequiredService(Type) Metoda

Definicja

Pobiera usługę typu serviceType z implementowania tego interfejsu IServiceProvider .

public:
 System::Object ^ GetRequiredService(Type ^ serviceType);
public object GetRequiredService(Type serviceType);
abstract member GetRequiredService : Type -> obj
Public Function GetRequiredService (serviceType As Type) As Object

Parametry

serviceType
Type

Obiekt określający typ obiektu usługi do pobrania.

Zwraca

Obiekt usługi typu serviceType. Zgłasza wyjątek, jeśli IServiceProvider obiekt nie może zostać utworzony.

Dotyczy