| ServiceLocatorImplBaseGetInstanceTService Method (String) |
Get an instance of the given named TService.
Namespace: Microsoft.Practices.ServiceLocationAssembly: Microsoft.Practices.ServiceLocation (in Microsoft.Practices.ServiceLocation.dll) Version: 1.3.0.0 (1.3.0.0)
Syntax public virtual TService GetInstance<TService>(
string key
)
Public Overridable Function GetInstance(Of TService) (
key As String
) As TService
public:
generic<typename TService>
virtual TService GetInstance(
String^ key
)
abstract GetInstance :
key : string -> 'TService
override GetInstance :
key : string -> 'TService
Parameters
- key
- Type: SystemString
Name the object was registered with.
Type Parameters
- TService
- Type of object requested.
Return Value
Type:
TServiceThe requested service instance.
Implements
IServiceLocatorGetInstanceTService(String)Exceptions See Also