public IBinderInfo Bind(Type contract, Type implementation) { var binder = new BinderInfo(this, contract); CheckBindingCache(contract); Types.Add(contract, implementation); return(binder); }
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); }
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); }