diff options
| author | Rob Mensching <rob@firegiant.com> | 2024-01-11 18:26:20 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2024-03-06 18:03:38 -0800 |
| commit | 0d3d54992104288e9ee0c834d0b96e8502fd2d42 (patch) | |
| tree | 9efa49c4983cd2ba1becab64bd1f2faccac88acf /src/ext/Bal/test/examples/EarliestCoreMBA | |
| parent | 2824298d9dd817a47527c920363556b54ead5d5d (diff) | |
| download | wix-0d3d54992104288e9ee0c834d0b96e8502fd2d42.tar.gz wix-0d3d54992104288e9ee0c834d0b96e8502fd2d42.tar.bz2 wix-0d3d54992104288e9ee0c834d0b96e8502fd2d42.zip | |
Move the BootstrapperApplication out of proc
Diffstat (limited to 'src/ext/Bal/test/examples/EarliestCoreMBA')
4 files changed, 25 insertions, 29 deletions
diff --git a/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBA.cs b/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBA.cs index c9291a7f..490f4051 100644 --- a/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBA.cs +++ b/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBA.cs | |||
| @@ -6,14 +6,9 @@ namespace Example.EarliestCoreMBA | |||
| 6 | 6 | ||
| 7 | public class EarliestCoreBA : BootstrapperApplication | 7 | public class EarliestCoreBA : BootstrapperApplication |
| 8 | { | 8 | { |
| 9 | public EarliestCoreBA(IEngine engine) | ||
| 10 | : base(engine) | ||
| 11 | { | ||
| 12 | |||
| 13 | } | ||
| 14 | |||
| 15 | protected override void Run() | 9 | protected override void Run() |
| 16 | { | 10 | { |
| 11 | this.engine.Quit(0); | ||
| 17 | } | 12 | } |
| 18 | 13 | ||
| 19 | protected override void OnStartup(StartupEventArgs args) | 14 | protected override void OnStartup(StartupEventArgs args) |
diff --git a/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs b/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs deleted file mode 100644 index 672e17ee..00000000 --- a/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs +++ /dev/null | |||
| @@ -1,22 +0,0 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | [assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Example.EarliestCoreMBA.EarliestCoreBAFactory))] | ||
| 4 | namespace Example.EarliestCoreMBA | ||
| 5 | { | ||
| 6 | using WixToolset.Mba.Core; | ||
| 7 | |||
| 8 | public class EarliestCoreBAFactory : BaseBootstrapperApplicationFactory | ||
| 9 | { | ||
| 10 | private static int loadCount = 0; | ||
| 11 | |||
| 12 | protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) | ||
| 13 | { | ||
| 14 | if (loadCount > 0) | ||
| 15 | { | ||
| 16 | engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)"); | ||
| 17 | } | ||
| 18 | ++loadCount; | ||
| 19 | return new EarliestCoreBA(engine); | ||
| 20 | } | ||
| 21 | } | ||
| 22 | } | ||
diff --git a/src/ext/Bal/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj b/src/ext/Bal/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj index 7b9d1670..958381c3 100644 --- a/src/ext/Bal/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj +++ b/src/ext/Bal/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj | |||
| @@ -3,7 +3,12 @@ | |||
| 3 | <PropertyGroup> | 3 | <PropertyGroup> |
| 4 | <TargetFramework>net6.0</TargetFramework> | 4 | <TargetFramework>net6.0</TargetFramework> |
| 5 | <RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers> | 5 | <RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers> |
| 6 | <IsDncBA>true</IsDncBA> | 6 | <OutputType>WinExe</OutputType> |
| 7 | <DebugType>embedded</DebugType> | ||
| 7 | <Description>Earliest .NET Core MBA</Description> | 8 | <Description>Earliest .NET Core MBA</Description> |
| 8 | </PropertyGroup> | 9 | </PropertyGroup> |
| 10 | |||
| 11 | <ItemGroup> | ||
| 12 | <PackageReference Include="WixToolset.Mba.Core" /> | ||
| 13 | </ItemGroup> | ||
| 9 | </Project> | 14 | </Project> |
diff --git a/src/ext/Bal/test/examples/EarliestCoreMBA/Program.cs b/src/ext/Bal/test/examples/EarliestCoreMBA/Program.cs new file mode 100644 index 00000000..11cc46f0 --- /dev/null +++ b/src/ext/Bal/test/examples/EarliestCoreMBA/Program.cs | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace Example.EarliestCoreMBA | ||
| 4 | { | ||
| 5 | using WixToolset.Mba.Core; | ||
| 6 | |||
| 7 | internal class Program | ||
| 8 | { | ||
| 9 | private static int Main() | ||
| 10 | { | ||
| 11 | var application = new EarliestCoreBA(); | ||
| 12 | |||
| 13 | ManagedBootstrapperApplication.Run(application); | ||
| 14 | |||
| 15 | return 0; | ||
| 16 | } | ||
| 17 | } | ||
| 18 | } | ||
