Click or drag to resize
DigitalRuneIServiceLocatorGetInstanceTService Method (String)
Get an instance of the given named TService.

Namespace: Microsoft.Practices.ServiceLocation
Assembly: Microsoft.Practices.ServiceLocation (in Microsoft.Practices.ServiceLocation.dll) Version: 1.3.0.0 (1.3.0.0)
Syntax
TService GetInstance<TService>(
	string key
)

Parameters

key
Type: SystemString
Name the object was registered with.

Type Parameters

TService
Type of object requested.

Return Value

Type: TService
The requested service instance.
Exceptions
ExceptionCondition
ActivationExceptionif there is are errors resolving the service instance.
See Also