| IServiceLocatorGetInstance Method (Type, String) |
Get an instance of the given named serviceType.
Namespace: Microsoft.Practices.ServiceLocationAssembly: Microsoft.Practices.ServiceLocation (in Microsoft.Practices.ServiceLocation.dll) Version: 1.3.0.0 (1.3.0.0)
Syntax Object GetInstance(
Type serviceType,
string key
)
Function GetInstance (
serviceType As Type,
key As String
) As Object
Object^ GetInstance(
Type^ serviceType,
String^ key
)
abstract GetInstance :
serviceType : Type *
key : string -> Object
Parameters
- serviceType
- Type: SystemType
Type of object requested. - key
- Type: SystemString
Name the object was registered with.
Return Value
Type:
ObjectThe requested service instance.
Exceptions See Also