Esempio n. 1
0
 public static void AddInstance(this IContainer c, Type t, object f)
 {
     c.AddInfo(t, new SingletonInfo(() => f));
 }
Esempio n. 2
0
 public static void AddInfo <T>(this IContainer c, ObjectInfo o)
 {
     c.AddInfo(typeof(T), o);
 }
Esempio n. 3
0
 public static void AddInstance <TContract>(this IContainer c, TContract f) where TContract : class
 {
     c.AddInfo(typeof(TContract), new SingletonInfo(() => f));
 }
Esempio n. 4
0
 public static void AddPoolable <TContract>(this IContainer c, Func <TContract> F, int poolsize) where TContract : class
 {
     c.AddInfo(typeof(TContract), new PoolableInfo(F, poolsize));
 }
Esempio n. 5
0
 public static void AddPoolable(this IContainer c, Type t, Func <object> F, int poolsize)
 {
     c.AddInfo(t, new PoolableInfo(F, poolsize));
 }
Esempio n. 6
0
 public static void AddTransient(this IContainer c, Type t, Func <object> F)
 {
     c.AddInfo(t, new TransientInfo(F));
 }
Esempio n. 7
0
 public static void AddTransient <TContract>(this IContainer c, Func <TContract> F) where TContract : class
 {
     c.AddInfo(typeof(TContract), new TransientInfo(F));
 }
Esempio n. 8
0
 public static void AddScoped(this IContainer c, Type t, Func <object> F)
 {
     c.AddInfo(t, new ScopedInfo(F));
 }
Esempio n. 9
0
 public static void AddScoped <TContract>(this IContainer c, Func <TContract> F) where TContract : class
 {
     c.AddInfo(typeof(TContract), new ScopedInfo(F));
 }
Esempio n. 10
0
 public static void AddSingleton(this IContainer c, Type t, Func <object> F)
 {
     c.AddInfo(t, new SingletonInfo(F));
 }