Click or drag to resize
DigitalRuneServiceContainerGetInstanceTService Method (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 TService GetInstance<TService>(
	string key
)

Parameters

key
Type: SystemString
The name the object was registered with. Can be or empty.

Type Parameters

TService
The type of the service requested.

Return Value

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

Implements

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