Example #1
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 #2
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);
        }