Example #1
0
        public BindingUnderConstruction Bind(object key)
        {
            BindingUnderConstruction b = new BindingUnderConstruction(key);

            bindingsUnderConstruction.Add(b);
            return(b);
        }
Example #2
0
        // 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);
        }
Example #3
0
        // Equivalent to Bind(type).ToSingleInstanceOfType(type);
        public void BindTypeToSingleInstance(Type type)
        {
            BindingUnderConstruction b = new BindingUnderConstruction(type);

            bindingsUnderConstruction.Add(b);
            b.ToSingleInstanceOfType(type);
        }
Example #4
0
        // 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);
        }