diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-04-29 19:28:50 +1000 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-04-29 19:53:29 +1000 |
| commit | 39e930d9aaff250e0fd5019eeedaa40717a6c6fe (patch) | |
| tree | bc0865bc6c9ced1b4a06b408ff60cb83ef73cad3 /src/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs | |
| parent | f4b14ff16f78435285bb20f16d5d62b902e6ba17 (diff) | |
| download | wix-39e930d9aaff250e0fd5019eeedaa40717a6c6fe.tar.gz wix-39e930d9aaff250e0fd5019eeedaa40717a6c6fe.tar.bz2 wix-39e930d9aaff250e0fd5019eeedaa40717a6c6fe.zip | |
Add DotNetCoreBootstrapperApplicationHost for an SCD-style .NET Core BA.
Diffstat (limited to 'src/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs')
| -rw-r--r-- | src/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs b/src/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs new file mode 100644 index 00000000..672e17ee --- /dev/null +++ b/src/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs | |||
| @@ -0,0 +1,22 @@ | |||
| 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 | } | ||
