Interaction Workspace 8.0.0 .NET Developer's Guide and API Reference
RegisterInstance Method (t, name, instance, lifetime)
Namespaces ► Genesyslab.Desktop.Infrastructure.DependencyInjection ► UnityContainerEx ► RegisterInstance(Type, String, Object, LifetimeManager)
Registers an instance.
Declaration Syntax

C# | Visual Basic | Visual C++

    public override IUnityContainer RegisterInstance(
    	Type t,
    	string name,
    	Object instance,
    	LifetimeManager lifetime
    )

    Public Overrides Function RegisterInstance ( _
    	t As Type, _
    	name As String, _
    	instance As Object, _
    	lifetime As LifetimeManager _
    ) As IUnityContainer

    public:
    virtual IUnityContainer^ RegisterInstance(
    	Type^ t,
    	String^ name,
    	Object^ instance,
    	LifetimeManager^ lifetime
    ) override

Parameters

t (Type)
  The type.

name (String)
  The name.

instance (Object)
  The object.

lifetime (LifetimeManager)
  The life time manager.

Return Value
A unity container.
Remarks
Instance registration is much like setting a type as a singleton, except that instead of the container creating the instance the first time it is requested, the user creates the instance ahead of type and adds that instance to the container.

Assembly: Genesyslab.Desktop.Infrastructure (Module: Genesyslab.Desktop.Infrastructure) Version: 8.0.2.15 (8.0.002.15)