| ServiceLocatorImplBaseGetInstance 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 public virtual Object GetInstance(
Type serviceType,
string key
)
Public Overridable Function GetInstance (
serviceType As Type,
key As String
) As Object
public:
virtual Object^ GetInstance(
Type^ serviceType,
String^ key
)
abstract GetInstance :
serviceType : Type *
key : string -> Object
override 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.
Implements
IServiceLocatorGetInstance(Type, String)Exceptions See Also