StrangeIoC
0.6.0
The IoC/Binding Framework for Unity3D and C#
|
A binding maintains at least two — and optionally three — SemiBindings: More...
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] |
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.