EmptyServiceProvider.IKeyedServiceProvider.GetKeyedService Method

Definition

Gets the service object of the specified type.

 virtual System::Object ^ Microsoft.Extensions.DependencyInjection.IKeyedServiceProvider.GetKeyedService(Type ^ serviceType, System::Object ^ serviceKey) = Microsoft::Extensions::DependencyInjection::IKeyedServiceProvider::GetKeyedService;
object IKeyedServiceProvider.GetKeyedService(Type serviceType, object serviceKey);
abstract member Microsoft.Extensions.DependencyInjection.IKeyedServiceProvider.GetKeyedService : Type * obj -> obj
override this.Microsoft.Extensions.DependencyInjection.IKeyedServiceProvider.GetKeyedService : Type * obj -> obj
Function GetKeyedService (serviceType As Type, serviceKey As Object) As Object Implements IKeyedServiceProvider.GetKeyedService

Parameters

serviceType
Type

An object that specifies the type of service object to get.

serviceKey
Object

An object that specifies the key of service object to get.

Returns

A service object of type serviceType.

-or-

null if there is no service object of type serviceType.

Implements

Applies to