aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/ExtensibilityServices/BackendHelper.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core/ExtensibilityServices/BackendHelper.cs')
-rw-r--r--src/WixToolset.Core/ExtensibilityServices/BackendHelper.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/WixToolset.Core/ExtensibilityServices/BackendHelper.cs b/src/WixToolset.Core/ExtensibilityServices/BackendHelper.cs
index 0cda4437..6cc91487 100644
--- a/src/WixToolset.Core/ExtensibilityServices/BackendHelper.cs
+++ b/src/WixToolset.Core/ExtensibilityServices/BackendHelper.cs
@@ -19,18 +19,17 @@ namespace WixToolset.Core.ExtensibilityServices
19 19
20 private IMessaging Messaging { get; } 20 private IMessaging Messaging { get; }
21 21
22 public IFileTransfer CreateFileTransfer(string source, string destination, bool move, FileTransferType type, SourceLineNumber sourceLineNumbers) 22 public IFileTransfer CreateFileTransfer(string source, string destination, bool move, SourceLineNumber sourceLineNumbers = null)
23 { 23 {
24 var sourceFullPath = GetValidatedFullPath(sourceLineNumbers, source); 24 var sourceFullPath = this.GetValidatedFullPath(sourceLineNumbers, source);
25 25
26 var destinationFullPath = GetValidatedFullPath(sourceLineNumbers, destination); 26 var destinationFullPath = this.GetValidatedFullPath(sourceLineNumbers, destination);
27 27
28 return (String.IsNullOrEmpty(sourceFullPath) || String.IsNullOrEmpty(destinationFullPath)) ? null : new FileTransfer 28 return (String.IsNullOrEmpty(sourceFullPath) || String.IsNullOrEmpty(destinationFullPath)) ? null : new FileTransfer
29 { 29 {
30 Source = sourceFullPath, 30 Source = sourceFullPath,
31 Destination = destinationFullPath, 31 Destination = destinationFullPath,
32 Move = move, 32 Move = move,
33 Type = type,
34 SourceLineNumbers = sourceLineNumbers, 33 SourceLineNumbers = sourceLineNumbers,
35 Redundant = String.Equals(sourceFullPath, destinationFullPath, StringComparison.OrdinalIgnoreCase) 34 Redundant = String.Equals(sourceFullPath, destinationFullPath, StringComparison.OrdinalIgnoreCase)
36 }; 35 };
@@ -41,6 +40,11 @@ namespace WixToolset.Core.ExtensibilityServices
41 return Uuid.NewUuid(namespaceGuid, value).ToString("B").ToUpperInvariant(); 40 return Uuid.NewUuid(namespaceGuid, value).ToString("B").ToUpperInvariant();
42 } 41 }
43 42
43 public ITrackedFile TrackFile(string path, TrackedFileType type, SourceLineNumber sourceLineNumbers = null)
44 {
45 return new TrackedFile(path, type, sourceLineNumbers);
46 }
47
44 private string GetValidatedFullPath(SourceLineNumber sourceLineNumbers, string path) 48 private string GetValidatedFullPath(SourceLineNumber sourceLineNumbers, string path)
45 { 49 {
46 try 50 try