Udostępnij za pośrednictwem


ISupportRequiredService.GetRequiredService(Type) Metoda

Definicja

Pobiera usługę typu serviceType z IServiceProvider obiektu , który implementuje ten interfejs.

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

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.

Wyjątki

provider został już usunięty.

Dotyczy