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.injector.impl.InjectionBinder Class Reference

The Binder for creating Injection mappings. More...

Inheritance diagram for strange.extensions.injector.impl.InjectionBinder:
strange.framework.impl.Binder strange.extensions.injector.api.IInjectionBinder strange.framework.api.IBinder strange.framework.api.IInstanceProvider strange.extensions.injector.impl.CrossContextInjectionBinder

Public Member Functions

object GetInstance (Type key)
 Retrieve an Instance based on the key. More...
 
virtual object GetInstance (Type key, object name)
 Retrieve an Instance based on a key/name combo. More...
 
GetInstance< T > ()
 Retrieve an Instance based on the key. More...
 
GetInstance< T > (object name)
 Retrieve an Instance based on a key/name combo. More...
 
override IBinding GetRawBinding ()
 Generate an unpopulated IBinding in whatever concrete form the Binder dictates.
 
new IInjectionBinding Bind< T > ()
 
IInjectionBinding Bind (Type key)
 
virtual new IInjectionBinding GetBinding< T > ()
 
virtual new IInjectionBinding GetBinding< T > (object name)
 
virtual new IInjectionBinding GetBinding (object key)
 
virtual new IInjectionBinding GetBinding (object key, object name)
 
int ReflectAll ()
 Reflect all the types currently registered with InjectionBinder Return the number of types reflected, which should be equal to the number of concrete classes you've mapped. More...
 
int Reflect (List< Type > list)
 Reflect all the types in the list Return the number of types in the list, which should be equal to the list length.
 
- 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 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.
 
- Public Member Functions inherited from strange.extensions.injector.api.IInjectionBinder
void ResolveBinding (IBinding binding, object key)
 Places individual Bindings into the bindings Dictionary as part of the resolving process More...
 
IBinding Bind (object key)
 
void Unbind< T > ()
 
void Unbind< T > (object name)
 
void Unbind (object key)
 
void Unbind (object key, object name)
 
void Unbind (IBinding binding)
 

Protected Member Functions

virtual IInjector GetInjectorForBinding (IInjectionBinding binding)
 
- 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

IInjector injector [get, set]
 
- Properties inherited from strange.extensions.injector.api.IInjectionBinder
IInjector injector [get, set]
 Get or set an Injector to use. By default, Injector instantiates it's own, but that can be overridden.
 

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

The Binder for creating Injection mappings.

See Also
strange.extensions.injector.api.IInjectionBinder
strange.extensions.injector.api.IInjectionBinding

Member Function Documentation

object strange.extensions.injector.impl.InjectionBinder.GetInstance ( Type  key)
inline

Retrieve an Instance based on the key.

ex. injectionBinder.Get(typeof(ISomeInterface));

Implements strange.framework.api.IInstanceProvider.

virtual object strange.extensions.injector.impl.InjectionBinder.GetInstance ( Type  key,
object  name 
)
inlinevirtual

Retrieve an Instance based on a key/name combo.

ex. injectionBinder.Get(typeof(ISomeInterface), SomeEnum.MY_ENUM);

Implements strange.extensions.injector.api.IInjectionBinder.

Retrieve an Instance based on the key.

ex. injectionBinder.Get<cISomeInterface>();

Implements strange.framework.api.IInstanceProvider.

Retrieve an Instance based on a key/name combo.

ex. injectionBinder.Get<cISomeInterface>(SomeEnum.MY_ENUM);

Implements strange.extensions.injector.api.IInjectionBinder.

int strange.extensions.injector.impl.InjectionBinder.ReflectAll ( )
inline

Reflect all the types currently registered with InjectionBinder Return the number of types reflected, which should be equal to the number of concrete classes you've mapped.

Implements strange.extensions.injector.api.IInjectionBinder.


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