Click or drag to resize
DigitalRuneServiceContainerGetInstance Method (Type, String)
Gets a named instance of the given service type.

Namespace: DigitalRune.ServiceLocation
Assembly: DigitalRune.ServiceLocation (in DigitalRune.ServiceLocation.dll) Version: 1.3.0.0 (1.3.0.13596)
Syntax
public Object GetInstance(
	Type serviceType,
	string key
)

Parameters

serviceType
Type: SystemType
The type of the service requested.
key
Type: SystemString
The name the object was registered with. Can be or empty.

Return Value

Type: Object
The requested service instance or if the service has not been registered.

Implements

IServiceLocatorGetInstance(Type, String)
Exceptions
ExceptionCondition
ActivationException An error occurred while resolving the service instance.
See Also