Пример #1
0
 public static IObjectContainer DoneWithAutofac(this Bootstrapper that)
 {
     return(that.DoneWithAutofac(new ContainerBuilder()));
 }
Пример #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));
 }
Пример #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));
 }
Пример #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));
 }
Пример #5
0
 /// <summary>
 /// 注册类型
 /// </summary>
 public static Bootstrapper SetDefault <T>(this Bootstrapper that, Lifecycle lifecycle = Lifecycle.Singleton)
 {
     return(that.SetDefault <T>((string)null, lifecycle));
 }
Пример #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));
 }