Ejemplo n.º 1
0
        public IBinderInfo Bind(Type contract, Type implementation)
        {
            var binder = new BinderInfo(this, contract);

            CheckBindingCache(contract);
            Types.Add(contract, implementation);
            return(binder);
        }
Ejemplo n.º 2
0
        public IBinderInfo Bind(Type contract, Type implementation, object instance)
        {
            var binder = new BinderInfo(this, contract);

            CheckBindingCache(contract);
            Types.Add(contract, implementation);
            AddSingleton(contract, instance);
            return(binder);
        }
Ejemplo n.º 3
0
        public IBinderInfo <TImplementation> Bind <TContract, TImplementation>() where TImplementation : TContract
        {
            var binder = new BinderInfo <TImplementation>(this, typeof(TContract));

            CheckBindingCache(typeof(TContract));
            Types.Add(typeof(TContract), typeof(TImplementation));

            return(binder);
        }