diff --git a/Bootstrappers/AutofacBootstrapper.cs b/Bootstrappers/AutofacBootstrapper.cs index 227dc7e..b75c316 100644 --- a/Bootstrappers/AutofacBootstrapper.cs +++ b/Bootstrappers/AutofacBootstrapper.cs @@ -18,19 +18,12 @@ namespace Bootstrappers protected override void ConfigureBootstrapper() { - this.Configure(); - var builder = new ContainerBuilder(); this.DefaultConfigureIoC(builder); this.ConfigureIoC(builder); this.container = builder.Build(); } - /// - /// Override to configure anything that needs configuring - /// - protected virtual void Configure() { } - /// /// Carries out default configuration of the IoC container. Override if you don't want to do this /// diff --git a/Bootstrappers/CastleWindsorBootstrapper.cs b/Bootstrappers/CastleWindsorBootstrapper.cs index a1b9708..9fb5e39 100644 --- a/Bootstrappers/CastleWindsorBootstrapper.cs +++ b/Bootstrappers/CastleWindsorBootstrapper.cs @@ -19,18 +19,11 @@ namespace Bootstrappers protected override void ConfigureBootstrapper() { - this.Configure(); - this.container = new WindsorContainer(); this.DefaultConfigureIoC(this.container); this.ConfigureIoC(this.container); } - /// - /// Override to configure anything that needs configuring - /// - protected virtual void Configure() { } - /// /// Carries out default configuration of the IoC container. Override if you don't want to do this /// diff --git a/Bootstrappers/NinjectBootstrapper.cs b/Bootstrappers/NinjectBootstrapper.cs index 52a70e2..4d1f531 100644 --- a/Bootstrappers/NinjectBootstrapper.cs +++ b/Bootstrappers/NinjectBootstrapper.cs @@ -17,18 +17,11 @@ namespace Bootstrappers protected override void ConfigureBootstrapper() { - this.Configure(); - this.kernel = new StandardKernel(); this.DefaultConfigureIoC(this.kernel); this.ConfigureIoC(this.kernel); } - /// - /// Override to configure anything that needs configuring - /// - protected virtual void Configure() { } - /// /// Carries out default configuration of the IoC container. Override if you don't want to do this /// diff --git a/Bootstrappers/NoIoCContainerBootstrapper.cs b/Bootstrappers/NoIoCContainerBootstrapper.cs index 6949803..43ce7a5 100644 --- a/Bootstrappers/NoIoCContainerBootstrapper.cs +++ b/Bootstrappers/NoIoCContainerBootstrapper.cs @@ -10,16 +10,10 @@ namespace Bootstrappers protected override void ConfigureBootstrapper() { - this.Configure(); this.DefaultConfigureContainer(); this.ConfigureContainer(); } - /// - /// Override to configure anything that needs configuring - /// - protected virtual void Configure() { } - protected virtual void DefaultConfigureContainer() { var viewManager = new ViewManager(this); diff --git a/Bootstrappers/StructureMapBootstrapper.cs b/Bootstrappers/StructureMapBootstrapper.cs index d832cf8..1954b4e 100644 --- a/Bootstrappers/StructureMapBootstrapper.cs +++ b/Bootstrappers/StructureMapBootstrapper.cs @@ -18,8 +18,6 @@ namespace Bootstrappers protected override void ConfigureBootstrapper() { - this.Configure(); - this.container = new Container(config => { this.DefaultConfigureIoC(config); @@ -27,11 +25,6 @@ namespace Bootstrappers }); } - /// - /// Override to configure anything that needs configuring - /// - protected virtual void Configure() { } - /// /// Carries out default configuration of the IoC container. Override if you don't want to do this /// diff --git a/Bootstrappers/UnityBootstrapper.cs b/Bootstrappers/UnityBootstrapper.cs index 5657d42..c965cd6 100644 --- a/Bootstrappers/UnityBootstrapper.cs +++ b/Bootstrappers/UnityBootstrapper.cs @@ -17,18 +17,11 @@ namespace Bootstrappers protected override void ConfigureBootstrapper() { - this.Configure(); - this.container = new UnityContainer(); this.DefaultConfigureIoC(this.container); this.ConfigureIoC(this.container); } - /// - /// Override to configure anything that needs configuring - /// - protected virtual void Configure() { } - /// /// Carries out default configuration of the IoC container. Override if you don't want to do this /// diff --git a/Stylet/Bootstrapper.cs b/Stylet/Bootstrapper.cs index 5a16849..4f87ba2 100644 --- a/Stylet/Bootstrapper.cs +++ b/Stylet/Bootstrapper.cs @@ -40,15 +40,8 @@ namespace Stylet this.DefaultConfigureIoC(builder); this.Container = builder.BuildContainer(); - - this.Configure(); } - /// - /// Hook called after the IoC container has been set up - /// - protected virtual void Configure() { } - /// /// Carries out default configuration of StyletIoC. Override if you don't want to do this /// diff --git a/Stylet/BootstrapperBase.cs b/Stylet/BootstrapperBase.cs index 25b8fb9..ec0e044 100644 --- a/Stylet/BootstrapperBase.cs +++ b/Stylet/BootstrapperBase.cs @@ -87,10 +87,16 @@ namespace Stylet View.ViewManager = (IViewManager)this.GetInstance(typeof(IViewManager)); + this.Configure(); this.Launch(); this.OnLaunch(); } + /// + /// Hook called after the IoC container has been set up + /// + protected virtual void Configure() { } + /// /// Launch the root view ///