aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-03-14 07:38:48 -0700
committerRob Mensching <rob@firegiant.com>2021-03-14 07:47:48 -0700
commit3ccd5e439da4296d6f2b66ce47075ab20d039676 (patch)
treeb5546552613b869367d09f444492a0bbcfadcfe0 /src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs
parent574785ab1421c9b67336c13ade5c2263e665ca07 (diff)
downloadwix-3ccd5e439da4296d6f2b66ce47075ab20d039676.tar.gz
wix-3ccd5e439da4296d6f2b66ce47075ab20d039676.tar.bz2
wix-3ccd5e439da4296d6f2b66ce47075ab20d039676.zip
Minimize public surface area of Core
Fixes wixtoolset/issues#6374
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs')
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs
index a496c7ce..babe0c1b 100644
--- a/src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs
+++ b/src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs
@@ -7,19 +7,26 @@ namespace WixToolset.Core.WindowsInstaller.Bind
7 using System.Linq; 7 using System.Linq;
8 using WixToolset.Data; 8 using WixToolset.Data;
9 using WixToolset.Data.Symbols; 9 using WixToolset.Data.Symbols;
10 using WixToolset.Extensibility.Services;
10 11
11 /// <summary> 12 /// <summary>
12 /// Binds the summary information table of a database. 13 /// Binds the summary information table of a database.
13 /// </summary> 14 /// </summary>
14 internal class BindSummaryInfoCommand 15 internal class BindSummaryInfoCommand
15 { 16 {
16 public BindSummaryInfoCommand(IntermediateSection section) 17 public BindSummaryInfoCommand(IntermediateSection section, IBackendHelper backendHelper, IWixBranding branding)
17 { 18 {
18 this.Section = section; 19 this.Section = section;
20 this.BackendHelper = backendHelper;
21 this.Branding = branding;
19 } 22 }
20 23
21 private IntermediateSection Section { get; } 24 private IntermediateSection Section { get; }
22 25
26 private IBackendHelper BackendHelper { get; }
27
28 private IWixBranding Branding { get; }
29
23 /// <summary> 30 /// <summary>
24 /// Returns a flag indicating if files are compressed by default. 31 /// Returns a flag indicating if files are compressed by default.
25 /// </summary> 32 /// </summary>
@@ -66,7 +73,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
66 } 73 }
67 else 74 else
68 { 75 {
69 summaryInformationSymbol.Value = Common.GetValidCodePage(codepage, false, false, summaryInformationSymbol.SourceLineNumbers).ToString(CultureInfo.InvariantCulture); 76 summaryInformationSymbol.Value = this.BackendHelper.GetValidCodePage(codepage, false, false, summaryInformationSymbol.SourceLineNumbers).ToString(CultureInfo.InvariantCulture);
70 } 77 }
71 break; 78 break;
72 case SummaryInformationType.PlatformAndLanguage: 79 case SummaryInformationType.PlatformAndLanguage:
@@ -116,7 +123,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
116 this.Section.AddSymbol(new SummaryInformationSymbol(null) 123 this.Section.AddSymbol(new SummaryInformationSymbol(null)
117 { 124 {
118 PropertyId = SummaryInformationType.PackageCode, 125 PropertyId = SummaryInformationType.PackageCode,
119 Value = Common.GenerateGuid(), 126 Value = this.BackendHelper.CreateGuid(),
120 }); 127 });
121 } 128 }
122 129
@@ -146,7 +153,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
146 this.Section.AddSymbol(new SummaryInformationSymbol(null) 153 this.Section.AddSymbol(new SummaryInformationSymbol(null)
147 { 154 {
148 PropertyId = SummaryInformationType.CreatingApplication, 155 PropertyId = SummaryInformationType.CreatingApplication,
149 Value = String.Format(CultureInfo.InvariantCulture, AppCommon.GetCreatingApplicationString()), 156 Value = this.Branding.GetCreatingApplication(),
150 }); 157 });
151 } 158 }
152 } 159 }