From 39e930d9aaff250e0fd5019eeedaa40717a6c6fe Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 29 Apr 2020 19:28:50 +1000 Subject: Add DotNetCoreBootstrapperApplicationHost for an SCD-style .NET Core BA. --- .../examples/LatestCoreMBA/LatestCoreBAFactory.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/test/examples/LatestCoreMBA/LatestCoreBAFactory.cs (limited to 'src/test/examples/LatestCoreMBA/LatestCoreBAFactory.cs') 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 @@ +// 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. + +[assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Example.LatestCoreMBA.LatestCoreBAFactory))] +namespace Example.LatestCoreMBA +{ + using WixToolset.Mba.Core; + + public class LatestCoreBAFactory : BaseBootstrapperApplicationFactory + { + private static int loadCount = 0; + + protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) + { + if (loadCount > 0) + { + engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)"); + } + ++loadCount; + return new LatestCoreBA(engine); + } + } +} -- cgit v1.2.3-55-g6feb