public static IObjectContainer DoneWithAutofac(this Bootstrapper that)
 {
     return(that.DoneWithAutofac(new ContainerBuilder()));
 }
Esempio n. 2
0
 /// <summary>
 /// 注册类型
 /// </summary>
 public static Bootstrapper SetDefault <TFrom, TTo>(this Bootstrapper that, string name, Lifecycle lifecycle = Lifecycle.Singleton)
     where TTo : TFrom
 {
     return(that.SetDefault(typeof(TFrom), typeof(TTo), name, lifecycle));
 }
Esempio n. 3
0
 /// <summary>
 /// 注册类型
 /// </summary>
 public static Bootstrapper SetDefault <TFrom, TTo>(this Bootstrapper that, Lifecycle lifecycle = Lifecycle.Singleton)
     where TTo : TFrom
 {
     return(that.SetDefault <TFrom, TTo>((string)null, lifecycle));
 }
Esempio n. 4
0
 /// <summary>
 /// 注册类型
 /// </summary>
 public static Bootstrapper SetDefault <T>(this Bootstrapper that, string name, Lifecycle lifecycle = Lifecycle.Singleton)
 {
     return(that.SetDefault(typeof(T), name, lifecycle));
 }
Esempio n. 5
0
 /// <summary>
 /// 注册类型
 /// </summary>
 public static Bootstrapper SetDefault <T>(this Bootstrapper that, Lifecycle lifecycle = Lifecycle.Singleton)
 {
     return(that.SetDefault <T>((string)null, lifecycle));
 }
Esempio n. 6
0
 /// <summary>
 /// 注册类型
 /// </summary>
 public static Bootstrapper SetDefault(this Bootstrapper that, Type from, Type to, Lifecycle lifecycle = Lifecycle.Singleton)
 {
     return(that.SetDefault(from, to, (string)null, lifecycle));
 }