From 3ccd5e439da4296d6f2b66ce47075ab20d039676 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sun, 14 Mar 2021 07:38:48 -0700 Subject: Minimize public surface area of Core Fixes wixtoolset/issues#6374 --- .../Bind/ProcessDependencyReferencesCommand.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/ProcessDependencyReferencesCommand.cs') 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 private const string DependencyRegistryRoot = @"Software\Classes\Installer\Dependencies\"; private const string RegistryDependents = "Dependents"; - public ProcessDependencyReferencesCommand(IntermediateSection section, IEnumerable dependencyRefSymbols) + public ProcessDependencyReferencesCommand(IBackendHelper backendHelper, IntermediateSection section, IEnumerable dependencyRefSymbols) { + this.BackendHelper = backendHelper; this.Section = section; this.DependencyRefSymbols = dependencyRefSymbols; } + private IBackendHelper BackendHelper { get; } + private IntermediateSection Section { get; } private IEnumerable DependencyRefSymbols { get; } @@ -57,7 +60,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind // Get the component ID from the provider. var componentId = wixDependencyProviderRow.ComponentRef; - var id = Common.GenerateIdentifier("reg", providesId, requiresId, "(Default)"); + var id = this.BackendHelper.GenerateIdentifier("reg", providesId, requiresId, "(Default)"); this.Section.AddSymbol(new RegistrySymbol(wixDependencyRefRow.SourceLineNumbers, new Identifier(AccessModifier.Section, id)) { ComponentRef = componentId, @@ -68,7 +71,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind if (!String.IsNullOrEmpty(wixDependencyRow.MinVersion)) { - id = Common.GenerateIdentifier("reg", providesId, requiresId, "MinVersion"); + id = this.BackendHelper.GenerateIdentifier("reg", providesId, requiresId, "MinVersion"); this.Section.AddSymbol(new RegistrySymbol(wixDependencyRefRow.SourceLineNumbers, new Identifier(AccessModifier.Section, id)) { ComponentRef = componentId, @@ -79,10 +82,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind }); } - string maxVersion = (string)wixDependencyRow[3]; + var maxVersion = (string)wixDependencyRow[3]; if (!String.IsNullOrEmpty(wixDependencyRow.MaxVersion)) { - id = Common.GenerateIdentifier("reg", providesId, requiresId, "MaxVersion"); + id = this.BackendHelper.GenerateIdentifier("reg", providesId, requiresId, "MaxVersion"); this.Section.AddSymbol(new RegistrySymbol(wixDependencyRefRow.SourceLineNumbers, new Identifier(AccessModifier.Section, id)) { ComponentRef = componentId, @@ -95,7 +98,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind if (wixDependencyRow.Attributes != WixDependencySymbolAttributes.None) { - id = Common.GenerateIdentifier("reg", providesId, requiresId, "Attributes"); + id = this.BackendHelper.GenerateIdentifier("reg", providesId, requiresId, "Attributes"); this.Section.AddSymbol(new RegistrySymbol(wixDependencyRefRow.SourceLineNumbers, new Identifier(AccessModifier.Section, id)) { ComponentRef = componentId, -- cgit v1.2.3-55-g6feb