Exemplo 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);
        }
Exemplo 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));
 }
Exemplo n.º 4
0
 protected bool Equals(ContainerKey other)
 {
     return (Type == other.Type) && string.Equals(Name, other.Name);
 }