Exemple #1
0
 public Container RegisterSingleton <TBase, TDerived>() where TDerived : class, TBase where TBase : class
 {
     _providers[typeof(TBase)] = new SingletonActivatorObjectProvider <TDerived>(this);
     return(this);
 }
Exemple #2
0
 public Container RegisterSingleton <T>() where T : class, new()
 {
     _providers[typeof(T)] = new SingletonActivatorObjectProvider <T>(this);
     return(this);
 }