StrangeIoC  0.6.0
The IoC/Binding Framework for Unity3D and C#
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
strange.extensions.context.impl.CrossContext Class Reference

Provides the capabilities that allow a Context to communicate across the Context boundary. More...

Inheritance diagram for strange.extensions.context.impl.CrossContext:
strange.extensions.context.impl.Context strange.extensions.context.api.ICrossContextCapable strange.framework.impl.Binder strange.extensions.context.api.IContext strange.framework.api.IBinder strange.framework.api.IBinder strange.extensions.context.impl.MVCSContext

Public Member Functions

 CrossContext (object view)
 
 CrossContext (object view, ContextStartupFlags flags)
 
 CrossContext (object view, bool autoMapping)
 
override IContext AddContext (IContext context)
 Add another Context to this one.
 
virtual void AssignCrossContext (ICrossContextCapable childContext)
 Add cross-context functionality to a child context being added.
 
virtual void RemoveCrossContext (ICrossContextCapable childContext)
 Clean up cross-context functionality from a child context being removed.
 
override IContext RemoveContext (IContext context)
 Remove a context from this one.
 
- Public Member Functions inherited from strange.extensions.context.impl.Context
 Context (object view, ContextStartupFlags flags)
 
 Context (object view)
 
 Context (object view, bool autoMapping)
 
virtual IContext SetContextView (object view)
 Set the object that represents the top of the Context hierarchy. More...
 
virtual object GetContextView ()
 Get the ContextView.
 
virtual IContext Start ()
 Call this from your Root to set everything in action.
 
virtual void Launch ()
 The final method to fire after mappings. More...
 
virtual object GetComponent< T > ()
 Retrieve a component from this Context by generic type.
 
virtual object GetComponent< T > (object name)
 Retrieve a component from this Context by generic type and name.
 
virtual void AddView (object view)
 Register a View with this Context.
 
virtual void RemoveView (object view)
 Remove a View from this Context.
 
- Public Member Functions inherited from strange.framework.impl.Binder
delegate void BindingResolver (IBinding binding)
 A handler for resolving the nature of a binding during chained commands.
 
virtual IBinding Bind< T > ()
 Bind a Binding Key to a class or interface generic.
 
virtual IBinding Bind (object key)
 Bind a Binding Key to a value.
 
virtual IBinding GetBinding< T > ()
 Retrieve a binding based on the provided Type.
 
virtual IBinding GetBinding (object key)
 Retrieve a binding based on the provided object.
 
virtual IBinding GetBinding< T > (object name)
 Retrieve a binding based on the provided Key (generic)/Name combo.
 
virtual IBinding GetBinding (object key, object name)
 Retrieve a binding based on the provided Key/Name combo.
 
virtual void Unbind< T > ()
 Remove a binding based on the provided Key (generic)
 
virtual void Unbind (object key)
 Remove a binding based on the provided Key.
 
virtual void Unbind< T > (object name)
 Remove a binding based on the provided Key (generic) / Name combo.
 
virtual void Unbind (object key, object name)
 Remove a binding based on the provided Key / Name combo.
 
virtual void Unbind (IBinding binding)
 Remove the provided binding from the Binder.
 
virtual void RemoveValue (IBinding binding, object value)
 Remove a select value from the given binding.
 
virtual void RemoveKey (IBinding binding, object key)
 Remove a select key from the given binding.
 
virtual void RemoveName (IBinding binding, object name)
 Remove a select name from the given binding.
 
virtual IBinding GetRawBinding ()
 Generate an unpopulated IBinding in whatever concrete form the Binder dictates.
 
virtual void ResolveBinding (IBinding binding, object key)
 This method places individual Bindings into the bindings Dictionary as part of the resolving process. More...
 
virtual void OnRemove ()
 The Binder is being removed Override this method to clean up remaining bindings.
 
- Public Member Functions inherited from strange.extensions.context.api.ICrossContextCapable
object GetComponent< T > ()
 Request a component from the context (might be useful in certain cross-context situations) This is technically a deprecated methodology. More...
 
object GetComponent< T > (object name)
 Request a component from the context (might be useful in certain cross-context situations) This is technically a deprecated methodology. More...
 

Protected Member Functions

override void addCoreComponents ()
 Override to add componentry. Or just extend MVCSContext.
 
override void instantiateCoreComponents ()
 Override to instantiate componentry. Or just extend MVCSContext.
 
- Protected Member Functions inherited from strange.extensions.context.impl.Context
virtual void mapBindings ()
 Override to map project-specific bindings.
 
virtual void postBindings ()
 Override to do things after binding but before app launch.
 
- Protected Member Functions inherited from strange.framework.impl.Binder
virtual void resolver (IBinding binding)
 The default handler for resolving bindings during chained commands.
 
void registerNameConflict (object key, IBinding newBinding, IBinding existingBinding)
 Take note of bindings that are in conflict. More...
 
bool isConflictCleared (Dictionary< IBinding, object > dict, IBinding binding)
 Returns true if the provided binding and the binding in the dict are no longer conflicting.
 
void clearConflict (object key, object name, Dictionary< IBinding, object > dict)
 
T[] spliceValueAt< T > (int splicePos, object[] objectValue)
 
object[] spliceValueAt (int splicePos, object[] objectValue)
 Remove the item at splicePos from the list objectValue.
 

Protected Attributes

IEventDispatcher _crossContextDispatcher
 A specific instance of EventDispatcher that communicates across multiple contexts. More...
 

Properties

ICrossContextInjectionBinder injectionBinder [get, set]
 A Binder that handles dependency injection binding and instantiation.
 
virtual IDispatcher crossContextDispatcher [get, set]
 
virtual IBinder crossContextBridge [get, set]
 
- Properties inherited from strange.extensions.context.impl.Context
object contextView [get, set]
 The top of the View hierarchy. More...
 
- Properties inherited from strange.extensions.context.api.ICrossContextCapable
ICrossContextInjectionBinder injectionBinder [get, set]
 All cross-context capable contexts must implement an injectionBinder.
 
IDispatcher crossContextDispatcher [get, set]
 Set and get the shared system bus for communicating across contexts.
 

Additional Inherited Members

- Public Attributes inherited from strange.extensions.context.impl.Context
bool autoStartup
 If false, the Launch() method won't fire.
 
- Static Public Attributes inherited from strange.extensions.context.impl.Context
static IContext firstContext
 In a multi-Context app, this represents the first Context to instantiate.
 

Detailed Description

Provides the capabilities that allow a Context to communicate across the Context boundary.

Specifically, CrossContext provides

Member Data Documentation

IEventDispatcher strange.extensions.context.impl.CrossContext._crossContextDispatcher
protected

A specific instance of EventDispatcher that communicates across multiple contexts.

An event sent across this dispatcher will be re-dispatched by the various context-wide dispatchers. So a dispatch to other contexts is simply

crossContextDispatcher.Dispatch(MY_EVENT, payload);

Other contexts don't need to listen to the cross-context dispatcher as such, just map the necessary event to your local context dispatcher and you'll receive it.


The documentation for this class was generated from the following file: