Udostępnij za pośrednictwem


ISupportRequiredService.GetRequiredService(Type) Metoda

Definicja

Pobiera usługę typu serviceType z IServiceProvider, która 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 nie może utworzyć obiektu.

Wyjątki

provider został już usunięty.

Dotyczy