aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.WixBA/Model.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.WixBA/Model.cs')
-rw-r--r--src/WixToolset.WixBA/Model.cs17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/WixToolset.WixBA/Model.cs b/src/WixToolset.WixBA/Model.cs
index 25415e0f..fda8eab2 100644
--- a/src/WixToolset.WixBA/Model.cs
+++ b/src/WixToolset.WixBA/Model.cs
@@ -20,27 +20,32 @@ namespace WixToolset.WixBA
20 /// Creates a new model for the BA. 20 /// Creates a new model for the BA.
21 /// </summary> 21 /// </summary>
22 /// <param name="bootstrapper">The BA.</param> 22 /// <param name="bootstrapper">The BA.</param>
23 public Model(BootstrapperApplication bootstrapper) 23 public Model(WixBA bootstrapper)
24 { 24 {
25 this.BAManifest = bootstrapper.BAManifest;
25 this.Bootstrapper = bootstrapper; 26 this.Bootstrapper = bootstrapper;
27 this.Command = bootstrapper.Command;
28 this.Engine = bootstrapper.Engine;
26 this.Telemetry = new List<KeyValuePair<string, string>>(); 29 this.Telemetry = new List<KeyValuePair<string, string>>();
27 this.Version = this.Engine.VersionVariables[BurnBundleVersionVariable]; 30 this.Version = this.Engine.VersionVariables[BurnBundleVersionVariable];
28 } 31 }
29 32
33 public IBootstrapperApplicationData BAManifest { get; }
34
30 /// <summary> 35 /// <summary>
31 /// Gets the bootstrapper. 36 /// Gets the bootstrapper.
32 /// </summary> 37 /// </summary>
33 public BootstrapperApplication Bootstrapper { get; private set; } 38 public IDefaultBootstrapperApplication Bootstrapper { get; }
34 39
35 /// <summary> 40 /// <summary>
36 /// Gets the bootstrapper command-line. 41 /// Gets the bootstrapper command-line.
37 /// </summary> 42 /// </summary>
38 public Command Command { get { return this.Bootstrapper.Command; } } 43 public IBootstrapperCommand Command { get; }
39 44
40 /// <summary> 45 /// <summary>
41 /// Gets the bootstrapper engine. 46 /// Gets the bootstrapper engine.
42 /// </summary> 47 /// </summary>
43 public Engine Engine { get { return this.Bootstrapper.Engine; } } 48 public IEngine Engine { get; }
44 49
45 /// <summary> 50 /// <summary>
46 /// Gets the key/value pairs used in telemetry. 51 /// Gets the key/value pairs used in telemetry.
@@ -121,9 +126,7 @@ namespace WixToolset.WixBA
121 /// <returns>Display name of the package if found or the package id if not.</returns> 126 /// <returns>Display name of the package if found or the package id if not.</returns>
122 public string GetPackageName(string packageId) 127 public string GetPackageName(string packageId)
123 { 128 {
124 PackageInfo package; 129 return this.BAManifest.Bundle.Packages.TryGetValue(packageId, out var package) ? package.DisplayName : packageId;
125
126 return this.Bootstrapper.BAManifest.Bundle.Packages.TryGetValue(packageId, out package) ? package.DisplayName : packageId;
127 } 130 }
128 } 131 }
129} 132}