Esempio n. 1
0
        public Container RegisterProvider <TBase, TDerived>(IObjectProvider <TDerived> provider, string name = null) where TDerived : class, TBase
        {
            var key = new ContainerKey(typeof(TBase), name);

            _providers[key] = new ProviderWrapper <TDerived>(provider);
            return(this);
        }
Esempio n. 2
0
        public Container RegisterProvider <T>(IObjectProvider <T> provider, string name = null) where T : class
        {
            var key = new ContainerKey(typeof(T), name);

            _providers[key] = new ProviderWrapper <T>(provider);
            return(this);
        }
 protected bool Equals(ContainerKey other)
 {
     return((Type == other.Type) && string.Equals(Name, other.Name));
 }
Esempio n. 4
0
 protected bool Equals(ContainerKey other)
 {
     return (Type == other.Type) && string.Equals(Name, other.Name);
 }