Share via


IKeyedServiceProvider.GetRequiredKeyedService(Type, Object) Méthode

Définition

Obtient le service de type serviceType à partir du IServiceProvider qui implémente cette interface.

public:
 System::Object ^ GetRequiredKeyedService(Type ^ serviceType, System::Object ^ serviceKey);
public object GetRequiredKeyedService (Type serviceType, object? serviceKey);
abstract member GetRequiredKeyedService : Type * obj -> obj
Public Function GetRequiredKeyedService (serviceType As Type, serviceKey As Object) As Object

Paramètres

serviceType
Type

Objet spécifiant le type d'objet service à obtenir.

serviceKey
Object

ServiceKey du service.

Retours

Objet service de type serviceType. Lève une exception si IServiceProvider ne peut pas créer l’objet.

S’applique à