| IServiceLocatorGetInstanceTService 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 TService GetInstance<TService>(
string key
)
Function GetInstance(Of TService) (
key As String
) As TService
generic<typename TService>
TService GetInstance(
String^ key
)
abstract 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.
Exceptions See Also