public static IObjectContainer DoneWithAutofac(this Bootstrapper that) { return(that.DoneWithAutofac(new ContainerBuilder())); }
/// <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)); }
/// <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)); }
/// <summary> /// 注册类型 /// </summary> public static Bootstrapper SetDefault <T>(this Bootstrapper that, string name, Lifecycle lifecycle = Lifecycle.Singleton) { return(that.SetDefault(typeof(T), name, lifecycle)); }
/// <summary> /// 注册类型 /// </summary> public static Bootstrapper SetDefault <T>(this Bootstrapper that, Lifecycle lifecycle = Lifecycle.Singleton) { return(that.SetDefault <T>((string)null, lifecycle)); }
/// <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)); }