Register an instance with the container.

C# | Visual Basic | Visual C++ |
public IObjectContainer RegisterInstance<TInterface>( TInterface instance, bool singleton )
Public Function RegisterInstance(Of TInterface) ( _ instance As TInterface, _ singleton As Boolean _ ) As IObjectContainer
public: generic<typename TInterface> virtual IObjectContainer^ RegisterInstance( TInterface instance, bool singleton ) sealed

- TInterface
- Type of instance to register (may be an implemented interface instead of the full type).

- instance (TInterface)
- Object to returned.
- singleton (Boolean)
- If set to true the instance is registered as a singleton.

The ObjectContainer object that this method was called on.