diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2021-02-17 15:45:19 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2021-02-17 16:20:10 -0600 |
| commit | badde27bf66fcacef2d625af0bd7590ecdc5804f (patch) | |
| tree | c70f7da4642b2c9d2613a575fbb0169bc3034a60 /src/TestBA/TestBAFactory.cs | |
| parent | e950ce317301aea2e9c8cdab1bf8c453c40a4edd (diff) | |
| download | wix-badde27bf66fcacef2d625af0bd7590ecdc5804f.tar.gz wix-badde27bf66fcacef2d625af0bd7590ecdc5804f.tar.bz2 wix-badde27bf66fcacef2d625af0bd7590ecdc5804f.zip | |
Create WixTestTools project and reorganize files.
Diffstat (limited to 'src/TestBA/TestBAFactory.cs')
| -rw-r--r-- | src/TestBA/TestBAFactory.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/TestBA/TestBAFactory.cs b/src/TestBA/TestBAFactory.cs new file mode 100644 index 00000000..ba1de367 --- /dev/null +++ b/src/TestBA/TestBAFactory.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(WixToolset.Test.BA.TestBAFactory))] | ||
| 4 | namespace WixToolset.Test.BA | ||
| 5 | { | ||
| 6 | using WixToolset.Mba.Core; | ||
| 7 | |||
| 8 | public class TestBAFactory : 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 TestBA(engine, bootstrapperCommand); | ||
| 20 | } | ||
| 21 | } | ||
| 22 | } | ||
