| ServiceContainerGetInstance Method (Type, String) |
Gets a named instance of the given service type.
Namespace: DigitalRune.ServiceLocationAssembly: DigitalRune.ServiceLocation (in DigitalRune.ServiceLocation.dll) Version: 1.3.0.0 (1.3.0.13596)
Syntax public Object GetInstance(
Type serviceType,
string key
)
Public Function GetInstance (
serviceType As Type,
key As String
) As Object
public:
virtual Object^ GetInstance(
Type^ serviceType,
String^ key
) sealed
abstract GetInstance :
serviceType : Type *
key : string -> Object
override GetInstance :
serviceType : Type *
key : string -> Object
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 See Also