diff options
| author | Rob Mensching <rob@firegiant.com> | 2021-03-14 07:38:48 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2021-03-14 07:47:48 -0700 |
| commit | 3ccd5e439da4296d6f2b66ce47075ab20d039676 (patch) | |
| tree | b5546552613b869367d09f444492a0bbcfadcfe0 /src/WixToolset.Core.WindowsInstaller/Bind/GetFileFacadesCommand.cs | |
| parent | 574785ab1421c9b67336c13ade5c2263e665ca07 (diff) | |
| download | wix-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/GetFileFacadesCommand.cs')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Bind/GetFileFacadesCommand.cs | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/GetFileFacadesCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/GetFileFacadesCommand.cs index c918e866..949d5e18 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/GetFileFacadesCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/GetFileFacadesCommand.cs | |||
| @@ -6,36 +6,45 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
| 7 | using System.Globalization; | 7 | using System.Globalization; |
| 8 | using System.Linq; | 8 | using System.Linq; |
| 9 | using WixToolset.Core.Bind; | ||
| 10 | using WixToolset.Data; | 9 | using WixToolset.Data; |
| 11 | using WixToolset.Data.Symbols; | 10 | using WixToolset.Data.Symbols; |
| 11 | using WixToolset.Extensibility.Data; | ||
| 12 | using WixToolset.Extensibility.Services; | ||
| 12 | 13 | ||
| 13 | internal class GetFileFacadesCommand | 14 | internal class GetFileFacadesCommand |
| 14 | { | 15 | { |
| 15 | public GetFileFacadesCommand(IntermediateSection section) | 16 | public GetFileFacadesCommand(IntermediateSection section, IWindowsInstallerBackendHelper backendHelper) |
| 16 | { | 17 | { |
| 17 | this.Section = section; | 18 | this.Section = section; |
| 19 | this.BackendHelper = backendHelper; | ||
| 18 | } | 20 | } |
| 19 | 21 | ||
| 20 | private IntermediateSection Section { get; } | 22 | private IntermediateSection Section { get; } |
| 21 | 23 | ||
| 22 | public List<FileFacade> FileFacades { get; private set; } | 24 | private IWindowsInstallerBackendHelper BackendHelper { get; } |
| 25 | |||
| 26 | public List<IFileFacade> FileFacades { get; private set; } | ||
| 23 | 27 | ||
| 24 | public void Execute() | 28 | public void Execute() |
| 25 | { | 29 | { |
| 26 | var facades = new List<FileFacade>(); | 30 | var facades = new List<IFileFacade>(); |
| 27 | 31 | ||
| 28 | var assemblyFile = this.Section.Symbols.OfType<AssemblySymbol>().ToDictionary(t => t.Id.Id); | 32 | var assemblyFile = this.Section.Symbols.OfType<AssemblySymbol>().ToDictionary(t => t.Id.Id); |
| 33 | #if TODO_PATCHING_DELTA | ||
| 29 | //var deltaPatchFiles = this.Section.Symbols.OfType<WixDeltaPatchFileSymbol>().ToDictionary(t => t.Id.Id); | 34 | //var deltaPatchFiles = this.Section.Symbols.OfType<WixDeltaPatchFileSymbol>().ToDictionary(t => t.Id.Id); |
| 35 | #endif | ||
| 30 | 36 | ||
| 31 | foreach (var file in this.Section.Symbols.OfType<FileSymbol>()) | 37 | foreach (var file in this.Section.Symbols.OfType<FileSymbol>()) |
| 32 | { | 38 | { |
| 33 | assemblyFile.TryGetValue(file.Id.Id, out var assembly); | 39 | assemblyFile.TryGetValue(file.Id.Id, out var assembly); |
| 34 | 40 | ||
| 41 | #if TODO_PATCHING_DELTA | ||
| 35 | //deltaPatchFiles.TryGetValue(file.Id.Id, out var deltaPatchFile); | 42 | //deltaPatchFiles.TryGetValue(file.Id.Id, out var deltaPatchFile); |
| 43 | // TODO: should we be passing along delta information to the file facade? Probably, right? | ||
| 44 | #endif | ||
| 45 | var fileFacade = this.BackendHelper.CreateFileFacade(file, assembly); | ||
| 36 | 46 | ||
| 37 | facades.Add(new FileFacade(file, assembly)); | 47 | facades.Add(fileFacade); |
| 38 | //facades.Add(new FileFacade(file, wixFile, deltaPatchFile)); | ||
| 39 | } | 48 | } |
| 40 | 49 | ||
| 41 | #if TODO_PATCHING_DELTA | 50 | #if TODO_PATCHING_DELTA |
