public BindingUnderConstruction Bind(object key) { BindingUnderConstruction b = new BindingUnderConstruction(key); bindingsUnderConstruction.Add(b); return(b); }
// Equivalent to Bind(typeof(T)).ToExistingInstance(instanceGetter); public void BindExistingInstanceLazy <T>(Func <T> instanceGetter) { BindingUnderConstruction b = new BindingUnderConstruction(typeof(T)); bindingsUnderConstruction.Add(b); b.ToExistingInstance(instanceGetter); }
// Equivalent to Bind(type).ToSingleInstanceOfType(type); public void BindTypeToSingleInstance(Type type) { BindingUnderConstruction b = new BindingUnderConstruction(type); bindingsUnderConstruction.Add(b); b.ToSingleInstanceOfType(type); }
// Equivalent to Bind(typeof(T)).ToExistingInstance(instance); public void BindExistingInstance <T>(T instance) { BindingUnderConstruction b = new BindingUnderConstruction(typeof(T)); bindingsUnderConstruction.Add(b); b.ToExistingInstance(instance); }