mirror of https://github.com/AMT-Cheif/Stylet.git
Ensure View.ViewManager is set before Configure called
This commit is contained in:
parent
8479672028
commit
9f3a7d665a
|
@ -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();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override to configure anything that needs configuring
|
||||
/// </summary>
|
||||
protected virtual void Configure() { }
|
||||
|
||||
/// <summary>
|
||||
/// Carries out default configuration of the IoC container. Override if you don't want to do this
|
||||
/// </summary>
|
||||
|
|
|
@ -19,18 +19,11 @@ namespace Bootstrappers
|
|||
|
||||
protected override void ConfigureBootstrapper()
|
||||
{
|
||||
this.Configure();
|
||||
|
||||
this.container = new WindsorContainer();
|
||||
this.DefaultConfigureIoC(this.container);
|
||||
this.ConfigureIoC(this.container);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override to configure anything that needs configuring
|
||||
/// </summary>
|
||||
protected virtual void Configure() { }
|
||||
|
||||
/// <summary>
|
||||
/// Carries out default configuration of the IoC container. Override if you don't want to do this
|
||||
/// </summary>
|
||||
|
|
|
@ -17,18 +17,11 @@ namespace Bootstrappers
|
|||
|
||||
protected override void ConfigureBootstrapper()
|
||||
{
|
||||
this.Configure();
|
||||
|
||||
this.kernel = new StandardKernel();
|
||||
this.DefaultConfigureIoC(this.kernel);
|
||||
this.ConfigureIoC(this.kernel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override to configure anything that needs configuring
|
||||
/// </summary>
|
||||
protected virtual void Configure() { }
|
||||
|
||||
/// <summary>
|
||||
/// Carries out default configuration of the IoC container. Override if you don't want to do this
|
||||
/// </summary>
|
||||
|
|
|
@ -10,16 +10,10 @@ namespace Bootstrappers
|
|||
|
||||
protected override void ConfigureBootstrapper()
|
||||
{
|
||||
this.Configure();
|
||||
this.DefaultConfigureContainer();
|
||||
this.ConfigureContainer();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override to configure anything that needs configuring
|
||||
/// </summary>
|
||||
protected virtual void Configure() { }
|
||||
|
||||
protected virtual void DefaultConfigureContainer()
|
||||
{
|
||||
var viewManager = new ViewManager(this);
|
||||
|
|
|
@ -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
|
|||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override to configure anything that needs configuring
|
||||
/// </summary>
|
||||
protected virtual void Configure() { }
|
||||
|
||||
/// <summary>
|
||||
/// Carries out default configuration of the IoC container. Override if you don't want to do this
|
||||
/// </summary>
|
||||
|
|
|
@ -17,18 +17,11 @@ namespace Bootstrappers
|
|||
|
||||
protected override void ConfigureBootstrapper()
|
||||
{
|
||||
this.Configure();
|
||||
|
||||
this.container = new UnityContainer();
|
||||
this.DefaultConfigureIoC(this.container);
|
||||
this.ConfigureIoC(this.container);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override to configure anything that needs configuring
|
||||
/// </summary>
|
||||
protected virtual void Configure() { }
|
||||
|
||||
/// <summary>
|
||||
/// Carries out default configuration of the IoC container. Override if you don't want to do this
|
||||
/// </summary>
|
||||
|
|
|
@ -40,15 +40,8 @@ namespace Stylet
|
|||
this.DefaultConfigureIoC(builder);
|
||||
|
||||
this.Container = builder.BuildContainer();
|
||||
|
||||
this.Configure();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Hook called after the IoC container has been set up
|
||||
/// </summary>
|
||||
protected virtual void Configure() { }
|
||||
|
||||
/// <summary>
|
||||
/// Carries out default configuration of StyletIoC. Override if you don't want to do this
|
||||
/// </summary>
|
||||
|
|
|
@ -87,10 +87,16 @@ namespace Stylet
|
|||
|
||||
View.ViewManager = (IViewManager)this.GetInstance(typeof(IViewManager));
|
||||
|
||||
this.Configure();
|
||||
this.Launch();
|
||||
this.OnLaunch();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Hook called after the IoC container has been set up
|
||||
/// </summary>
|
||||
protected virtual void Configure() { }
|
||||
|
||||
/// <summary>
|
||||
/// Launch the root view
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue