aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2018-07-26 23:52:12 -0700
committerRob Mensching <rob@firegiant.com>2018-07-27 11:31:18 -0700
commit854e616eb3516c7405691b679617aa08c1dd1cdd (patch)
treece7694749bf88bc796825b84fbc4f9d8acae331d /src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs
parentc64faa7f6cb789a0756dff725146728889df8311 (diff)
downloadwix-854e616eb3516c7405691b679617aa08c1dd1cdd.tar.gz
wix-854e616eb3516c7405691b679617aa08c1dd1cdd.tar.bz2
wix-854e616eb3516c7405691b679617aa08c1dd1cdd.zip
Support change of FileTransfer to interface
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs')
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs18
1 files changed, 10 insertions, 8 deletions
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
11 using WixToolset.Data; 11 using WixToolset.Data;
12 using WixToolset.Data.Tuples; 12 using WixToolset.Data.Tuples;
13 using WixToolset.Extensibility.Data; 13 using WixToolset.Extensibility.Data;
14 using WixToolset.Extensibility.Services;
14 using WixToolset.Msi; 15 using WixToolset.Msi;
15 16
16 /// <summary> 17 /// <summary>
@@ -18,13 +19,16 @@ namespace WixToolset.Core.WindowsInstaller.Bind
18 /// </summary> 19 /// </summary>
19 internal class ProcessUncompressedFilesCommand 20 internal class ProcessUncompressedFilesCommand
20 { 21 {
21 public ProcessUncompressedFilesCommand(IntermediateSection section) 22 public ProcessUncompressedFilesCommand(IntermediateSection section, IBackendHelper backendHelper)
22 { 23 {
23 this.Section = section; 24 this.Section = section;
25 this.BackendHelper = backendHelper;
24 } 26 }
25 27
26 private IntermediateSection Section { get; } 28 private IntermediateSection Section { get; }
27 29
30 public IBackendHelper BackendHelper { get; }
31
28 public string DatabasePath { private get; set; } 32 public string DatabasePath { private get; set; }
29 33
30 public IEnumerable<FileFacade> FileFacades { private get; set; } 34 public IEnumerable<FileFacade> FileFacades { private get; set; }
@@ -37,11 +41,11 @@ namespace WixToolset.Core.WindowsInstaller.Bind
37 41
38 public Func<MediaTuple, string, string, string> ResolveMedia { private get; set; } 42 public Func<MediaTuple, string, string, string> ResolveMedia { private get; set; }
39 43
40 public IEnumerable<FileTransfer> FileTransfers { get; private set; } 44 public IEnumerable<IFileTransfer> FileTransfers { get; private set; }
41 45
42 public void Execute() 46 public void Execute()
43 { 47 {
44 var fileTransfers = new List<FileTransfer>(); 48 var fileTransfers = new List<IFileTransfer>();
45 49
46 var directories = new Dictionary<string, ResolvedDirectory>(); 50 var directories = new Dictionary<string, ResolvedDirectory>();
47 51
@@ -103,11 +107,9 @@ namespace WixToolset.Core.WindowsInstaller.Bind
103 } 107 }
104 108
105 // finally put together the base media layout path and the relative file layout path 109 // finally put together the base media layout path and the relative file layout path
106 string fileLayoutPath = Path.Combine(mediaLayoutDirectory, relativeFileLayoutPath); 110 var fileLayoutPath = Path.Combine(mediaLayoutDirectory, relativeFileLayoutPath);
107 if (FileTransfer.TryCreate(facade.WixFile.Source.Path, fileLayoutPath, false, "File", facade.File.SourceLineNumbers, out var transfer)) 111 var transfer = this.BackendHelper.CreateFileTransfer(facade.WixFile.Source.Path, fileLayoutPath, false, FileTransferType.Content, facade.File.SourceLineNumbers);
108 { 112 fileTransfers.Add(transfer);
109 fileTransfers.Add(transfer);
110 }
111 } 113 }
112 } 114 }
113 } 115 }