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

Binds a key SemiBinding to a vlaue Semibinding. More...

Inheritance diagram for strange.framework.api.IBinding:
strange.extensions.command.api.ICommandBinding strange.extensions.dispatcher.eventdispatcher.api.IEventBinding strange.extensions.injector.api.IInjectionBinding strange.extensions.mediation.api.IMediationBinding strange.framework.impl.Binding strange.extensions.command.impl.CommandBinding strange.extensions.sequencer.api.ISequenceBinding strange.extensions.dispatcher.eventdispatcher.impl.EventBinding strange.extensions.injector.impl.InjectionBinding strange.extensions.mediation.impl.MediationBinding strange.extensions.command.impl.CommandBinding strange.extensions.dispatcher.eventdispatcher.impl.EventBinding strange.extensions.injector.impl.InjectionBinding strange.extensions.mediation.impl.MediationBinding

Public Member Functions

IBinding Bind< T > ()
 Tie this binding to a Type key.
 
IBinding Bind (object key)
 Tie this binding to a value key, such as a string or class instance.
 
IBinding To< T > ()
 Set the Binding's value to a Type.
 
IBinding To (object o)
 Set the Binding's value to a value, such as a string or class instance.
 
IBinding ToName< T > ()
 Qualify a binding using a marker type.
 
IBinding ToName (object o)
 Qualify a binding using a value, such as a string or class instance.
 
IBinding Named< T > ()
 Retrieve a binding if the supplied name matches, by Type.
 
IBinding Named (object o)
 Retrieve a binding if the supplied name matches, by value.
 
void RemoveKey (object o)
 Remove a specific key from the binding.
 
void RemoveValue (object o)
 Remove a specific value from the binding.
 
void RemoveName (object o)
 Remove a name from the binding.
 
IBinding Weak ()
 

Properties

object key [get]
 Get the binding''s key.
 
object name [get]
 Get the binding's name.
 
object value [get]
 Get the binding's value.
 
Enum keyConstraint [get, set]
 Get or set a MANY or ONE constraint on the Key.
 
Enum valueConstraint [get, set]
 Get or set a MANY or ONE constraint on the Value.
 
bool isWeak [get]
 

Detailed Description

Binds a key SemiBinding to a vlaue Semibinding.

Bindings represent the smallest element of Strange with which most developers will normally interact.

A Strange binding is made up of two required parts and one optional part (SemiBindings).

The required parts are a key and a value. The key triggers the value; thus an event can be the key that triggers a callback. Or the instantiation of one class can be the key that leads to the instantiation of another class. The optional part is a name. Under some circumstances, it is useful to qualify two bindings with identical keys. Under these circumstances, the name serves as a discriminator.

Note that SemiBindings maintain lists, so RemoveKey, RemoveValue and RemoveName delete an entry from those lists.


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