aboutsummaryrefslogtreecommitdiff
path: root/src/test/examples/LatestCoreMBA/LatestCoreBAFactory.cs
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2020-04-29 19:28:50 +1000
committerSean Hall <r.sean.hall@gmail.com>2020-04-29 19:53:29 +1000
commit39e930d9aaff250e0fd5019eeedaa40717a6c6fe (patch)
treebc0865bc6c9ced1b4a06b408ff60cb83ef73cad3 /src/test/examples/LatestCoreMBA/LatestCoreBAFactory.cs
parentf4b14ff16f78435285bb20f16d5d62b902e6ba17 (diff)
downloadwix-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/LatestCoreMBA/LatestCoreBAFactory.cs')
-rw-r--r--src/test/examples/LatestCoreMBA/LatestCoreBAFactory.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/examples/LatestCoreMBA/LatestCoreBAFactory.cs b/src/test/examples/LatestCoreMBA/LatestCoreBAFactory.cs
new file mode 100644
index 00000000..fff3b5c5
--- /dev/null
+++ b/src/test/examples/LatestCoreMBA/LatestCoreBAFactory.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.LatestCoreMBA.LatestCoreBAFactory))]
4namespace Example.LatestCoreMBA
5{
6 using WixToolset.Mba.Core;
7
8 public class LatestCoreBAFactory : 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 LatestCoreBA(engine);
20 }
21 }
22}