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