diff options
author | Rob Mensching <rob@firegiant.com> | 2021-05-03 15:55:48 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2021-05-03 15:55:48 -0700 |
commit | ba7bab476501c16e437b0aee71c1be02c3dda176 (patch) | |
tree | 814fba485c29a7dfe1adb396169e27ed641ef9a3 /src/ext/Bal/test/examples/FullFramework4MBA | |
parent | 14987a72cc1a3493ca8f80693d273352fc314bd9 (diff) | |
download | wix-ba7bab476501c16e437b0aee71c1be02c3dda176.tar.gz wix-ba7bab476501c16e437b0aee71c1be02c3dda176.tar.bz2 wix-ba7bab476501c16e437b0aee71c1be02c3dda176.zip |
Move Bal.wixext into ext
Diffstat (limited to 'src/ext/Bal/test/examples/FullFramework4MBA')
4 files changed, 92 insertions, 0 deletions
diff --git a/src/ext/Bal/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj b/src/ext/Bal/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj new file mode 100644 index 00000000..a05e7888 --- /dev/null +++ b/src/ext/Bal/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj | |||
@@ -0,0 +1,19 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!-- 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. --> | ||
3 | |||
4 | <Project Sdk="Microsoft.NET.Sdk"> | ||
5 | <PropertyGroup> | ||
6 | <TargetFramework>net48</TargetFramework> | ||
7 | <Description>Full Framework v4 MBA</Description> | ||
8 | <RuntimeIdentifier>win-x86</RuntimeIdentifier> | ||
9 | </PropertyGroup> | ||
10 | |||
11 | <ItemGroup> | ||
12 | <PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="all" /> | ||
13 | <PackageReference Include="WixToolset.Mba.Core" Version="4.0.*" PrivateAssets="All" /> | ||
14 | </ItemGroup> | ||
15 | |||
16 | <ItemGroup> | ||
17 | <Content Include="WixToolset.Mba.Host.config" CopyToOutputDirectory="PreserveNewest" /> | ||
18 | </ItemGroup> | ||
19 | </Project> \ No newline at end of file | ||
diff --git a/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BA.cs b/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BA.cs new file mode 100644 index 00000000..8ee3bd19 --- /dev/null +++ b/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BA.cs | |||
@@ -0,0 +1,34 @@ | |||
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.FullFramework4MBA | ||
4 | { | ||
5 | using WixToolset.Mba.Core; | ||
6 | |||
7 | public class FullFramework4BA : BootstrapperApplication | ||
8 | { | ||
9 | public FullFramework4BA(IEngine engine) | ||
10 | : base(engine) | ||
11 | { | ||
12 | |||
13 | } | ||
14 | |||
15 | protected override void Run() | ||
16 | { | ||
17 | } | ||
18 | |||
19 | protected override void OnStartup(StartupEventArgs args) | ||
20 | { | ||
21 | base.OnStartup(args); | ||
22 | |||
23 | this.engine.Log(LogLevel.Standard, nameof(FullFramework4BA)); | ||
24 | } | ||
25 | |||
26 | protected override void OnShutdown(ShutdownEventArgs args) | ||
27 | { | ||
28 | base.OnShutdown(args); | ||
29 | |||
30 | var message = "Shutdown," + args.Action.ToString() + "," + args.HResult.ToString(); | ||
31 | this.engine.Log(LogLevel.Standard, message); | ||
32 | } | ||
33 | } | ||
34 | } | ||
diff --git a/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BAFactory.cs b/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BAFactory.cs new file mode 100644 index 00000000..6a571a54 --- /dev/null +++ b/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BAFactory.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.FullFramework4MBA.FullFramework4BAFactory))] | ||
4 | namespace Example.FullFramework4MBA | ||
5 | { | ||
6 | using WixToolset.Mba.Core; | ||
7 | |||
8 | public class FullFramework4BAFactory : 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 FullFramework4BA(engine); | ||
20 | } | ||
21 | } | ||
22 | } | ||
diff --git a/src/ext/Bal/test/examples/FullFramework4MBA/WixToolset.Mba.Host.config b/src/ext/Bal/test/examples/FullFramework4MBA/WixToolset.Mba.Host.config new file mode 100644 index 00000000..96678cda --- /dev/null +++ b/src/ext/Bal/test/examples/FullFramework4MBA/WixToolset.Mba.Host.config | |||
@@ -0,0 +1,17 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <!-- 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. --> | ||
3 | |||
4 | |||
5 | <configuration> | ||
6 | <configSections> | ||
7 | <sectionGroup name="wix.bootstrapper" type="WixToolset.Mba.Host.BootstrapperSectionGroup, WixToolset.Mba.Host"> | ||
8 | <section name="host" type="WixToolset.Mba.Host.HostSection, WixToolset.Mba.Host" /> | ||
9 | </sectionGroup> | ||
10 | </configSections> | ||
11 | <startup> | ||
12 | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /> | ||
13 | </startup> | ||
14 | <wix.bootstrapper> | ||
15 | <host assemblyName="Example.FullFramework4MBA" /> | ||
16 | </wix.bootstrapper> | ||
17 | </configuration> | ||