aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller/Bind/ProcessDependencyReferencesCommand.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/ProcessDependencyReferencesCommand.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/ProcessDependencyReferencesCommand.cs')
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Bind/ProcessDependencyReferencesCommand.cs15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/ProcessDependencyReferencesCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/ProcessDependencyReferencesCommand.cs
index 7a7c2649..5ec93f49 100644
--- a/src/WixToolset.Core.WindowsInstaller/Bind/ProcessDependencyReferencesCommand.cs
+++ b/src/WixToolset.Core.WindowsInstaller/Bind/ProcessDependencyReferencesCommand.cs
@@ -17,12 +17,15 @@ namespace WixToolset.Core.WindowsInstaller.Bind
17 private const string DependencyRegistryRoot = @"Software\Classes\Installer\Dependencies\"; 17 private const string DependencyRegistryRoot = @"Software\Classes\Installer\Dependencies\";
18 private const string RegistryDependents = "Dependents"; 18 private const string RegistryDependents = "Dependents";
19 19
20 public ProcessDependencyReferencesCommand(IntermediateSection section, IEnumerable<WixDependencyRefSymbol> dependencyRefSymbols) 20 public ProcessDependencyReferencesCommand(IBackendHelper backendHelper, IntermediateSection section, IEnumerable<WixDependencyRefSymbol> dependencyRefSymbols)
21 { 21 {
22 this.BackendHelper = backendHelper;
22 this.Section = section; 23 this.Section = section;
23 this.DependencyRefSymbols = dependencyRefSymbols; 24 this.DependencyRefSymbols = dependencyRefSymbols;
24 } 25 }
25 26
27 private IBackendHelper BackendHelper { get; }
28
26 private IntermediateSection Section { get; } 29 private IntermediateSection Section { get; }
27 30
28 private IEnumerable<WixDependencyRefSymbol> DependencyRefSymbols { get; } 31 private IEnumerable<WixDependencyRefSymbol> DependencyRefSymbols { get; }
@@ -57,7 +60,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
57 // Get the component ID from the provider. 60 // Get the component ID from the provider.
58 var componentId = wixDependencyProviderRow.ComponentRef; 61 var componentId = wixDependencyProviderRow.ComponentRef;
59 62
60 var id = Common.GenerateIdentifier("reg", providesId, requiresId, "(Default)"); 63 var id = this.BackendHelper.GenerateIdentifier("reg", providesId, requiresId, "(Default)");
61 this.Section.AddSymbol(new RegistrySymbol(wixDependencyRefRow.SourceLineNumbers, new Identifier(AccessModifier.Section, id)) 64 this.Section.AddSymbol(new RegistrySymbol(wixDependencyRefRow.SourceLineNumbers, new Identifier(AccessModifier.Section, id))
62 { 65 {
63 ComponentRef = componentId, 66 ComponentRef = componentId,
@@ -68,7 +71,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
68 71
69 if (!String.IsNullOrEmpty(wixDependencyRow.MinVersion)) 72 if (!String.IsNullOrEmpty(wixDependencyRow.MinVersion))
70 { 73 {
71 id = Common.GenerateIdentifier("reg", providesId, requiresId, "MinVersion"); 74 id = this.BackendHelper.GenerateIdentifier("reg", providesId, requiresId, "MinVersion");
72 this.Section.AddSymbol(new RegistrySymbol(wixDependencyRefRow.SourceLineNumbers, new Identifier(AccessModifier.Section, id)) 75 this.Section.AddSymbol(new RegistrySymbol(wixDependencyRefRow.SourceLineNumbers, new Identifier(AccessModifier.Section, id))
73 { 76 {
74 ComponentRef = componentId, 77 ComponentRef = componentId,
@@ -79,10 +82,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
79 }); 82 });
80 } 83 }
81 84
82 string maxVersion = (string)wixDependencyRow[3]; 85 var maxVersion = (string)wixDependencyRow[3];
83 if (!String.IsNullOrEmpty(wixDependencyRow.MaxVersion)) 86 if (!String.IsNullOrEmpty(wixDependencyRow.MaxVersion))
84 { 87 {
85 id = Common.GenerateIdentifier("reg", providesId, requiresId, "MaxVersion"); 88 id = this.BackendHelper.GenerateIdentifier("reg", providesId, requiresId, "MaxVersion");
86 this.Section.AddSymbol(new RegistrySymbol(wixDependencyRefRow.SourceLineNumbers, new Identifier(AccessModifier.Section, id)) 89 this.Section.AddSymbol(new RegistrySymbol(wixDependencyRefRow.SourceLineNumbers, new Identifier(AccessModifier.Section, id))
87 { 90 {
88 ComponentRef = componentId, 91 ComponentRef = componentId,
@@ -95,7 +98,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
95 98
96 if (wixDependencyRow.Attributes != WixDependencySymbolAttributes.None) 99 if (wixDependencyRow.Attributes != WixDependencySymbolAttributes.None)
97 { 100 {
98 id = Common.GenerateIdentifier("reg", providesId, requiresId, "Attributes"); 101 id = this.BackendHelper.GenerateIdentifier("reg", providesId, requiresId, "Attributes");
99 this.Section.AddSymbol(new RegistrySymbol(wixDependencyRefRow.SourceLineNumbers, new Identifier(AccessModifier.Section, id)) 102 this.Section.AddSymbol(new RegistrySymbol(wixDependencyRefRow.SourceLineNumbers, new Identifier(AccessModifier.Section, id))
100 { 103 {
101 ComponentRef = componentId, 104 ComponentRef = componentId,