Click or drag to resize
DigitalRuneIServiceLocatorGetInstance Method (Type, String)
Get an instance of the given named serviceType.

Namespace: Microsoft.Practices.ServiceLocation
Assembly: Microsoft.Practices.ServiceLocation (in Microsoft.Practices.ServiceLocation.dll) Version: 1.3.0.0 (1.3.0.0)
Syntax
Object GetInstance(
	Type serviceType,
	string key
)

Parameters

serviceType
Type: SystemType
Type of object requested.
key
Type: SystemString
Name the object was registered with.

Return Value

Type: Object
The requested service instance.
Exceptions
ExceptionCondition
ActivationExceptionif there is an error resolving the service instance.
See Also