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 | Properties | List of all members
strange.extensions.mediation.impl.MediationBinder Class Reference

Binds Views to Mediators. More...

Inheritance diagram for strange.extensions.mediation.impl.MediationBinder:
strange.framework.impl.Binder strange.extensions.mediation.api.IMediationBinder strange.framework.api.IBinder strange.framework.api.IBinder

Public Member Functions

override IBinding GetRawBinding ()
 Generate an unpopulated IBinding in whatever concrete form the Binder dictates.
 
void Trigger (MediationEvent evt, IView view)
 An event that just happened, and the View it happened to. More...
 
override IBinding Bind< T > ()
 Bind a Binding Key to a class or interface generic.
 
IMediationBinding BindView< T > ()
 Porcelain for Bind<T> providing a little extra clarity and security.
 
- 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 (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 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.
 

Protected Member Functions

virtual void injectViewAndChildren (IView view)
 Initialize all IViews within this view.
 
virtual void mapView (IView view, IMediationBinding binding)
 Creates and registers one or more Mediators for a specific View instance. More...
 
virtual void unmapView (IView view, IMediationBinding binding)
 Removes a mediator when its view is destroyed.
 
- 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.
 

Properties

IInjectionBinder injectionBinder [get, set]
 

Additional Inherited Members

- Protected Attributes inherited from strange.framework.impl.Binder
Dictionary< object, Dictionary
< object, IBinding > > 
bindings
 Dictionary of all bindings Two-layer keys. More...
 
Dictionary< object, Dictionary
< IBinding, object > > 
conflicts
 

Detailed Description

Binds Views to Mediators.

Please read strange.extensions.mediation.api.IMediationBinder where I've extensively explained the purpose of View mediation

Member Function Documentation

virtual void strange.extensions.mediation.impl.MediationBinder.mapView ( IView  view,
IMediationBinding  binding 
)
inlineprotectedvirtual

Creates and registers one or more Mediators for a specific View instance.

Takes a specific View instance and a binding and, if a binding is found for that type, creates and registers a Mediator.

void strange.extensions.mediation.impl.MediationBinder.Trigger ( MediationEvent  evt,
IView  view 
)
inline

An event that just happened, and the View it happened to.

If the event was Awake, it will trigger creation of a mapped Mediator.

Implements strange.extensions.mediation.api.IMediationBinder.


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