mirror of https://github.com/AMT-Cheif/Stylet.git
Update bootstrappers to dispose their containers
This commit is contained in:
parent
e119386335
commit
5e40db124d
|
@ -2,6 +2,7 @@
|
|||
using Stylet;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
|
||||
namespace Bootstrappers
|
||||
{
|
||||
|
@ -46,5 +47,10 @@ namespace Bootstrappers
|
|||
{
|
||||
return this.container.Resolve(type);
|
||||
}
|
||||
|
||||
protected override void OnExitInternal(ExitEventArgs e)
|
||||
{
|
||||
this.container.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<HintPath>packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="StructureMap">
|
||||
<HintPath>packages\structuremap.3.1.4.143\lib\net40\StructureMap.dll</HintPath>
|
||||
</Reference>
|
||||
|
|
|
@ -3,6 +3,7 @@ using Castle.MicroKernel.Registration;
|
|||
using Castle.Windsor;
|
||||
using Stylet;
|
||||
using System;
|
||||
using System.Windows;
|
||||
|
||||
namespace Bootstrappers
|
||||
{
|
||||
|
@ -52,5 +53,10 @@ namespace Bootstrappers
|
|||
{
|
||||
return this.container.Resolve(type);
|
||||
}
|
||||
|
||||
protected override void OnExitInternal(ExitEventArgs e)
|
||||
{
|
||||
this.container.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using Ninject;
|
||||
using Stylet;
|
||||
using System;
|
||||
using System.Windows;
|
||||
|
||||
namespace Bootstrappers
|
||||
{
|
||||
|
@ -43,5 +44,10 @@ namespace Bootstrappers
|
|||
{
|
||||
return this.kernel.Get(type);
|
||||
}
|
||||
|
||||
protected override void OnExitInternal(ExitEventArgs e)
|
||||
{
|
||||
this.kernel.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
using StructureMap.Pipeline;
|
||||
using Stylet;
|
||||
using System;
|
||||
using System.Windows;
|
||||
|
||||
namespace Bootstrappers
|
||||
{
|
||||
|
@ -50,5 +51,10 @@ namespace Bootstrappers
|
|||
{
|
||||
return this.container.GetInstance(type);
|
||||
}
|
||||
|
||||
protected override void OnExitInternal(ExitEventArgs e)
|
||||
{
|
||||
this.container.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using Microsoft.Practices.Unity;
|
||||
using Stylet;
|
||||
using System;
|
||||
using System.Windows;
|
||||
|
||||
namespace Bootstrappers
|
||||
{
|
||||
|
@ -46,6 +47,11 @@ namespace Bootstrappers
|
|||
{
|
||||
return this.container.Resolve(type);
|
||||
}
|
||||
|
||||
protected override void OnExitInternal(ExitEventArgs e)
|
||||
{
|
||||
this.container.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue