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/ProcessUncompressedFilesCommand.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/ProcessUncompressedFilesCommand.cs')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs index ab5ebd4b..8c66a9e1 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs | |||
| @@ -6,7 +6,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
| 7 | using System.IO; | 7 | using System.IO; |
| 8 | using System.Linq; | 8 | using System.Linq; |
| 9 | using WixToolset.Core.Bind; | ||
| 10 | using WixToolset.Core.WindowsInstaller.Msi; | 9 | using WixToolset.Core.WindowsInstaller.Msi; |
| 11 | using WixToolset.Data; | 10 | using WixToolset.Data; |
| 12 | using WixToolset.Data.Symbols; | 11 | using WixToolset.Data.Symbols; |
| @@ -33,7 +32,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 33 | 32 | ||
| 34 | public string DatabasePath { private get; set; } | 33 | public string DatabasePath { private get; set; } |
| 35 | 34 | ||
| 36 | public IEnumerable<FileFacade> FileFacades { private get; set; } | 35 | public IEnumerable<IFileFacade> FileFacades { private get; set; } |
| 37 | 36 | ||
| 38 | public string LayoutDirectory { private get; set; } | 37 | public string LayoutDirectory { private get; set; } |
| 39 | 38 | ||
| @@ -63,7 +62,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 63 | { | 62 | { |
| 64 | foreach (var directoryRecord in directoryView.Records) | 63 | foreach (var directoryRecord in directoryView.Records) |
| 65 | { | 64 | { |
| 66 | var sourceName = Common.GetName(directoryRecord.GetString(3), true, this.LongNamesInImage); | 65 | var sourceName = this.BackendHelper.GetMsiFileName(directoryRecord.GetString(3), true, this.LongNamesInImage); |
| 67 | 66 | ||
| 68 | var resolvedDirectory = this.BackendHelper.CreateResolvedDirectory(directoryRecord.GetString(2), sourceName); | 67 | var resolvedDirectory = this.BackendHelper.CreateResolvedDirectory(directoryRecord.GetString(2), sourceName); |
| 69 | 68 | ||
| @@ -71,16 +70,16 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 71 | } | 70 | } |
| 72 | } | 71 | } |
| 73 | 72 | ||
| 74 | using (View fileView = db.OpenView("SELECT `Directory_`, `FileName` FROM `Component`, `File` WHERE `Component`.`Component`=`File`.`Component_` AND `File`.`File`=?")) | 73 | using (var fileView = db.OpenView("SELECT `Directory_`, `FileName` FROM `Component`, `File` WHERE `Component`.`Component`=`File`.`Component_` AND `File`.`File`=?")) |
| 75 | { | 74 | { |
| 76 | using (Record fileQueryRecord = new Record(1)) | 75 | using (var fileQueryRecord = new Record(1)) |
| 77 | { | 76 | { |
| 78 | // for each file in the array of uncompressed files | 77 | // for each file in the array of uncompressed files |
| 79 | foreach (FileFacade facade in this.FileFacades) | 78 | foreach (var facade in this.FileFacades) |
| 80 | { | 79 | { |
| 81 | var mediaSymbol = mediaRows[facade.DiskId]; | 80 | var mediaSymbol = mediaRows[facade.DiskId]; |
| 82 | string relativeFileLayoutPath = null; | 81 | string relativeFileLayoutPath = null; |
| 83 | string mediaLayoutFolder = mediaSymbol.Layout; | 82 | var mediaLayoutFolder = mediaSymbol.Layout; |
| 84 | 83 | ||
| 85 | var mediaLayoutDirectory = this.ResolveMedia(mediaSymbol, mediaLayoutFolder, this.LayoutDirectory); | 84 | var mediaLayoutDirectory = this.ResolveMedia(mediaSymbol, mediaLayoutFolder, this.LayoutDirectory); |
| 86 | 85 | ||
| @@ -89,7 +88,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 89 | fileQueryRecord[1] = facade.Id; | 88 | fileQueryRecord[1] = facade.Id; |
| 90 | fileView.Execute(fileQueryRecord); | 89 | fileView.Execute(fileQueryRecord); |
| 91 | 90 | ||
| 92 | using (Record fileRecord = fileView.Fetch()) | 91 | using (var fileRecord = fileView.Fetch()) |
| 93 | { | 92 | { |
| 94 | if (null == fileRecord) | 93 | if (null == fileRecord) |
| 95 | { | 94 | { |
