From 854e616eb3516c7405691b679617aa08c1dd1cdd Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 26 Jul 2018 23:52:12 -0700 Subject: Support change of FileTransfer to interface --- .../Bind/ProcessUncompressedFilesCommand.cs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs') diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs index 4b143ead..b09f92bb 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs @@ -11,6 +11,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind using WixToolset.Data; using WixToolset.Data.Tuples; using WixToolset.Extensibility.Data; + using WixToolset.Extensibility.Services; using WixToolset.Msi; /// @@ -18,13 +19,16 @@ namespace WixToolset.Core.WindowsInstaller.Bind /// internal class ProcessUncompressedFilesCommand { - public ProcessUncompressedFilesCommand(IntermediateSection section) + public ProcessUncompressedFilesCommand(IntermediateSection section, IBackendHelper backendHelper) { this.Section = section; + this.BackendHelper = backendHelper; } private IntermediateSection Section { get; } + public IBackendHelper BackendHelper { get; } + public string DatabasePath { private get; set; } public IEnumerable FileFacades { private get; set; } @@ -37,11 +41,11 @@ namespace WixToolset.Core.WindowsInstaller.Bind public Func ResolveMedia { private get; set; } - public IEnumerable FileTransfers { get; private set; } + public IEnumerable FileTransfers { get; private set; } public void Execute() { - var fileTransfers = new List(); + var fileTransfers = new List(); var directories = new Dictionary(); @@ -103,11 +107,9 @@ namespace WixToolset.Core.WindowsInstaller.Bind } // finally put together the base media layout path and the relative file layout path - string fileLayoutPath = Path.Combine(mediaLayoutDirectory, relativeFileLayoutPath); - if (FileTransfer.TryCreate(facade.WixFile.Source.Path, fileLayoutPath, false, "File", facade.File.SourceLineNumbers, out var transfer)) - { - fileTransfers.Add(transfer); - } + var fileLayoutPath = Path.Combine(mediaLayoutDirectory, relativeFileLayoutPath); + var transfer = this.BackendHelper.CreateFileTransfer(facade.WixFile.Source.Path, fileLayoutPath, false, FileTransferType.Content, facade.File.SourceLineNumbers); + fileTransfers.Add(transfer); } } } -- cgit v1.2.3-55-g6feb