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 | Public Attributes | Protected Attributes | Properties | List of all members
strange.framework.impl.Binding Class Reference

A binding maintains at least two — and optionally three — SemiBindings: More...

Inheritance diagram for strange.framework.impl.Binding:
strange.framework.api.IBinding strange.extensions.command.impl.CommandBinding strange.extensions.dispatcher.eventdispatcher.impl.EventBinding strange.extensions.injector.impl.InjectionBinding strange.extensions.mediation.impl.MediationBinding strange.extensions.sequencer.impl.SequenceBinding

Public Member Functions

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

Public Attributes

Binder.BindingResolver resolver
 

Protected Attributes

ISemiBinding _key
 
ISemiBinding _value
 
ISemiBinding _name
 
bool _isWeak = false
 

Properties

object key [get]
 
object value [get]
 
object name [get]
 
Enum keyConstraint [get, set]
 
Enum valueConstraint [get, set]
 
Enum nameConstraint [get, set]
 
bool isWeak [get]
 
- Properties inherited from strange.framework.api.IBinding
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

A binding maintains at least two — and optionally three — SemiBindings:

Resolver

The resolver method (type Binder.BindingResolver) is a callback passed in to resolve instantiation chains.

Strange v0.7 adds Pools as an alternative form of SemiBinding. Pools can recycle groups of instances. Binding implements IPool to act as a facade on any Pool SemiBinding.

See Also
strange.framework.api.IBinding;
strange.framework.api.IPool;
strange.framework.impl.Binder;

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