summaryrefslogtreecommitdiff
path: root/src/ext/Bal/test/examples/FullFramework2MBA
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-05-03 15:55:48 -0700
committerRob Mensching <rob@firegiant.com>2021-05-03 15:55:48 -0700
commitba7bab476501c16e437b0aee71c1be02c3dda176 (patch)
tree814fba485c29a7dfe1adb396169e27ed641ef9a3 /src/ext/Bal/test/examples/FullFramework2MBA
parent14987a72cc1a3493ca8f80693d273352fc314bd9 (diff)
downloadwix-ba7bab476501c16e437b0aee71c1be02c3dda176.tar.gz
wix-ba7bab476501c16e437b0aee71c1be02c3dda176.tar.bz2
wix-ba7bab476501c16e437b0aee71c1be02c3dda176.zip
Move Bal.wixext into ext
Diffstat (limited to 'src/ext/Bal/test/examples/FullFramework2MBA')
-rw-r--r--src/ext/Bal/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj20
-rw-r--r--src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BA.cs34
-rw-r--r--src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BAFactory.cs22
-rw-r--r--src/ext/Bal/test/examples/FullFramework2MBA/WixToolset.Mba.Host.config20
4 files changed, 96 insertions, 0 deletions
diff --git a/src/ext/Bal/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj b/src/ext/Bal/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj
new file mode 100644
index 00000000..21079ed1
--- /dev/null
+++ b/src/ext/Bal/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj
@@ -0,0 +1,20 @@
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>net20</TargetFramework>
7 <AssemblyName>Example.FullFramework2MBA</AssemblyName>
8 <RootNamespace>Example.FullFramework2MBA</RootNamespace>
9 <DebugType>embedded</DebugType>
10 <RuntimeIdentifier>win-x86</RuntimeIdentifier>
11 </PropertyGroup>
12
13 <ItemGroup>
14 <Content Include="WixToolset.Mba.Host.config" CopyToOutputDirectory="PreserveNewest" />
15 </ItemGroup>
16
17 <ItemGroup>
18 <PackageReference Include="WixToolset.Mba.Core" Version="4.0.*" />
19 </ItemGroup>
20</Project> \ No newline at end of file
diff --git a/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BA.cs b/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BA.cs
new file mode 100644
index 00000000..32cd19c8
--- /dev/null
+++ b/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BA.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
3namespace Example.FullFramework2MBA
4{
5 using WixToolset.Mba.Core;
6
7 public class FullFramework2BA : BootstrapperApplication
8 {
9 public FullFramework2BA(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(FullFramework2BA));
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/FullFramework2MBA/FullFramework2BAFactory.cs b/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BAFactory.cs
new file mode 100644
index 00000000..647c2040
--- /dev/null
+++ b/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BAFactory.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.FullFramework2MBA.FullFramework2BAFactory))]
4namespace Example.FullFramework2MBA
5{
6 using WixToolset.Mba.Core;
7
8 public class FullFramework2BAFactory : 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 FullFramework2BA(engine);
20 }
21 }
22}
diff --git a/src/ext/Bal/test/examples/FullFramework2MBA/WixToolset.Mba.Host.config b/src/ext/Bal/test/examples/FullFramework2MBA/WixToolset.Mba.Host.config
new file mode 100644
index 00000000..be450a4f
--- /dev/null
+++ b/src/ext/Bal/test/examples/FullFramework2MBA/WixToolset.Mba.Host.config
@@ -0,0 +1,20 @@
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="v2.0.50727" />
13 </startup>
14 <wix.bootstrapper>
15
16 <host assemblyName="Example.FullFramework2MBA">
17 <supportedFramework version="v3.5" />
18 </host>
19 </wix.bootstrapper>
20</configuration>