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 | List of all members
strange.framework.api.IBinder Interface Reference

Collection class for bindings. More...

Inheritance diagram for strange.framework.api.IBinder:
strange.extensions.command.api.ICommandBinder strange.extensions.context.api.IContext strange.extensions.mediation.api.IMediationBinder strange.framework.impl.Binder strange.extensions.command.impl.CommandBinder strange.extensions.sequencer.api.ISequencer strange.extensions.context.impl.Context strange.extensions.mediation.impl.MediationBinder strange.extensions.command.impl.CommandBinder strange.extensions.context.impl.Context strange.extensions.context.impl.CrossContextBridge strange.extensions.dispatcher.eventdispatcher.impl.EventDispatcher strange.extensions.injector.impl.InjectionBinder strange.extensions.mediation.impl.MediationBinder strange.extensions.reflector.impl.ReflectionBinder

Public Member Functions

IBinding Bind< T > ()
 Bind a Binding Key to a class or interface generic.
 
IBinding Bind (object value)
 Bind a Binding Key to a value.
 
IBinding GetBinding< T > ()
 Retrieve a binding based on the provided Type.
 
IBinding GetBinding (object key)
 Retrieve a binding based on the provided object.
 
IBinding GetBinding< T > (object name)
 Retrieve a binding based on the provided Key (generic)/Name combo.
 
IBinding GetBinding (object key, object name)
 Retrieve a binding based on the provided Key/Name combo.
 
IBinding GetRawBinding ()
 Generate an unpopulated IBinding in whatever concrete form the Binder dictates.
 
void Unbind< T > ()
 Remove a binding based on the provided Key (generic)
 
void Unbind< T > (object name)
 Remove a binding based on the provided Key (generic) / Name combo.
 
void Unbind (object key)
 Remove a binding based on the provided Key.
 
void Unbind (object key, object name)
 Remove a binding based on the provided Key / Name combo.
 
void Unbind (IBinding binding)
 Remove the provided binding from the Binder.
 
void RemoveValue (IBinding binding, object value)
 Remove a select value from the given binding.
 
void RemoveKey (IBinding binding, object value)
 Remove a select key from the given binding.
 
void RemoveName (IBinding binding, object value)
 Remove a select name from the given binding.
 
void OnRemove ()
 The Binder is being removed Override this method to clean up remaining bindings.
 
void ResolveBinding (IBinding binding, object key)
 Places individual Bindings into the bindings Dictionary as part of the resolving process More...
 

Detailed Description

Collection class for bindings.

Binders are a collection class (akin to ArrayList and Dictionary) with the specific purpose of connecting lists of things that are not necessarily related, but need some type of runtime association. Binders are the core concept of the StrangeIoC framework, allowing all the other functionality to exist and further functionality to easily be created.

Think of each Binder as a collection of causes and effects, or actions and reactions. If the Key action happens, it triggers the Value action. So, for example, an Event may be the Key that triggers instantiation of a particular class.

See Also
strange.framework.api.IBinding

Member Function Documentation

void strange.framework.api.IBinder.ResolveBinding ( IBinding  binding,
object  key 
)

Places individual Bindings into the bindings Dictionary as part of the resolving process

Note that while some Bindings may store multiple keys, each key takes a unique position in the bindings Dictionary.

Conflicts in the course of fluent binding are expected, but GetBinding will throw an error if there are any unresolved conflicts.

Implemented in strange.framework.impl.Binder, strange.extensions.injector.impl.CrossContextInjectionBinder, and strange.extensions.command.impl.SignalCommandBinder.


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