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