IContext
An IoC container that can nest contexts, set a context state and contain mediator instances.
Public Properties
Parent
|
The parent context of this context. Is null when no parent is available.
|
State
|
Current context state of this context. Is null when no state is active.
|
Children
|
Contexts that are a child of this context.
|
Mediators
|
Mediator instances that belong to this context.
|
Views
|
View instances that have no mediator bindings that belong to this context.
|
Public Methods
Initialize
|
Sets bindings and listens to signals for command executions. Optionally dispatches the EnterContextSignal.
|
Remove
|
Removes this context. All child contexts and mediator instances will be moved to this context’s parent.
|
InstantiateContext
|
Instantiates a context instance of the given type and assigns it as a child of this context.
|
SetParent
|
Sets the parent context of this context. This context will take over all injection and mediator bindings of the new parent but will overwrite them based on its own bindings.
|
Switch
|
Switches this context with another context. All mediator instances, child contexts and the current context state will be passed to the new context type.
|
SetContextState
|
Removes the current context state if any and instantiates a child context of the given type assigned as the new context state.
|
SwitchContextState
|
Switches the current context state to the given context type. If no current state is available a new context will be instantiated.
|
InstantiateView
|
Instantiates a view bound to a new mediator instance based on this context and its parent’s bindings. Binds mediator instance to this context.
|
AddMediator
|
Adds mediator instance to this context.
|
GetCulumativeInjectionBindings
|
Returns all injection bindings in parents overwritten by the bindings defined in this context.
|
GetCulumativeLabeledInjectionBindings
|
Returns all labeled injection bindings in parents overwritten by the bindings defined in this context.
|
GetCulumativeMediatorBindings
|
Returns all mediator bindings in parents overwritten by the bindings defined in this context.
|