Example #1
0
            public void ToExistingInstance <T>(T instance)
            {
                IProvider provider = new ExistingInstanceProvider <T>(instance);
                IBinding  binding  = new Binding(key, provider);

                this.binding = binding;
            }
            // Lazy binding of an instance.
            public void ToExistingInstance <T>(Func <T> instanceGetter)
            {
                IProvider provider   = new ExistingInstanceProvider <T>(instanceGetter);
                IBinding  newBinding = new Binding(key, provider);

                binding = newBinding;
            }