Registers the component service type TService with and implemetation of type TImp as a singleton.
| C# | Visual Basic | Visual C++ |
public void RegisterSingletonComponent<TService, TImp>( string key )
Public Sub RegisterSingletonComponent(Of TService, TImp) ( _ key As String _ )
public: generic<typename TService, typename TImp> virtual void RegisterSingletonComponent( String^ key ) sealed
- TService
- The contract type.
- TImp
- The implementing type.
- key (String)
- The key or name of the service.