diff options
author | Rob Mensching <rob@firegiant.com> | 2022-01-02 08:00:17 -0800 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2022-01-02 23:48:48 -0800 |
commit | 770bf982da4a81e56ba4be2b6a7a3afa3868a535 (patch) | |
tree | bef61406f3fc5fab1e77e8d04cb38c687dfea541 /src/api | |
parent | 009d7ccfdb03e25c23cae95b165fb9f1ad608579 (diff) | |
download | wix-770bf982da4a81e56ba4be2b6a7a3afa3868a535.tar.gz wix-770bf982da4a81e56ba4be2b6a7a3afa3868a535.tar.bz2 wix-770bf982da4a81e56ba4be2b6a7a3afa3868a535.zip |
Extract tracking and creating file transfers to ILayoutServices
This refactoring will allow more parts of the pipeline to add files
to be transferred during layout and tracked to participate in
MSBuild up to date checks and cleaning.
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/wix/WixToolset.Extensibility/Services/IBackendHelper.cs | 19 | ||||
-rw-r--r-- | src/api/wix/WixToolset.Extensibility/Services/ILayoutServices.cs | 30 |
2 files changed, 31 insertions, 18 deletions
diff --git a/src/api/wix/WixToolset.Extensibility/Services/IBackendHelper.cs b/src/api/wix/WixToolset.Extensibility/Services/IBackendHelper.cs index 5c4d9a68..29b8f8e6 100644 --- a/src/api/wix/WixToolset.Extensibility/Services/IBackendHelper.cs +++ b/src/api/wix/WixToolset.Extensibility/Services/IBackendHelper.cs | |||
@@ -12,7 +12,7 @@ namespace WixToolset.Extensibility.Services | |||
12 | /// <summary> | 12 | /// <summary> |
13 | /// Interface provided to help backend extensions. | 13 | /// Interface provided to help backend extensions. |
14 | /// </summary> | 14 | /// </summary> |
15 | public interface IBackendHelper | 15 | public interface IBackendHelper : ILayoutServices |
16 | { | 16 | { |
17 | /// <summary> | 17 | /// <summary> |
18 | /// Creates a file facade from a <c>FileSymbol</c> and possible <c>AssemblySymbol</c>. | 18 | /// Creates a file facade from a <c>FileSymbol</c> and possible <c>AssemblySymbol</c>. |
@@ -37,15 +37,6 @@ namespace WixToolset.Extensibility.Services | |||
37 | IFileFacade CreateFileFacadeFromMergeModule(FileSymbol fileSymbol); | 37 | IFileFacade CreateFileFacadeFromMergeModule(FileSymbol fileSymbol); |
38 | 38 | ||
39 | /// <summary> | 39 | /// <summary> |
40 | /// Creates a file transfer and marks it redundant if the source and destination are identical. | ||
41 | /// </summary> | ||
42 | /// <param name="source">Source for the file transfer.</param> | ||
43 | /// <param name="destination">Destination for the file transfer.</param> | ||
44 | /// <param name="move">Indicates whether to move or copy the source file.</param> | ||
45 | /// <param name="sourceLineNumbers">Optional source line numbers that requested the file transfer.</param> | ||
46 | IFileTransfer CreateFileTransfer(string source, string destination, bool move, SourceLineNumber sourceLineNumbers = null); | ||
47 | |||
48 | /// <summary> | ||
49 | /// Creates a MSI compatible GUID. | 40 | /// Creates a MSI compatible GUID. |
50 | /// </summary> | 41 | /// </summary> |
51 | /// <returns>Creates an uppercase GUID with braces.</returns> | 42 | /// <returns>Creates an uppercase GUID with braces.</returns> |
@@ -171,13 +162,5 @@ namespace WixToolset.Extensibility.Services | |||
171 | /// Thus the returned array will always be of length 4. | 162 | /// Thus the returned array will always be of length 4. |
172 | /// </remarks> | 163 | /// </remarks> |
173 | string[] SplitMsiFileName(string value); | 164 | string[] SplitMsiFileName(string value); |
174 | |||
175 | /// <summary> | ||
176 | /// Creates a tracked file. | ||
177 | /// </summary> | ||
178 | /// <param name="path">Destination path for the build output.</param> | ||
179 | /// <param name="type">Type of tracked file to create.</param> | ||
180 | /// <param name="sourceLineNumbers">Optional source line numbers that requested the tracked file.</param> | ||
181 | ITrackedFile TrackFile(string path, TrackedFileType type, SourceLineNumber sourceLineNumbers = null); | ||
182 | } | 165 | } |
183 | } | 166 | } |
diff --git a/src/api/wix/WixToolset.Extensibility/Services/ILayoutServices.cs b/src/api/wix/WixToolset.Extensibility/Services/ILayoutServices.cs new file mode 100644 index 00000000..79f89d29 --- /dev/null +++ b/src/api/wix/WixToolset.Extensibility/Services/ILayoutServices.cs | |||
@@ -0,0 +1,30 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.Extensibility.Services | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | using WixToolset.Extensibility.Data; | ||
7 | |||
8 | /// <summary> | ||
9 | /// Interface provided to track files for use by layout later. | ||
10 | /// </summary> | ||
11 | public interface ILayoutServices | ||
12 | { | ||
13 | /// <summary> | ||
14 | /// Creates a file transfer and marks it redundant if the source and destination are identical. | ||
15 | /// </summary> | ||
16 | /// <param name="source">Source for the file transfer.</param> | ||
17 | /// <param name="destination">Destination for the file transfer.</param> | ||
18 | /// <param name="move">Indicates whether to move or copy the source file.</param> | ||
19 | /// <param name="sourceLineNumbers">Optional source line numbers that requested the file transfer.</param> | ||
20 | IFileTransfer CreateFileTransfer(string source, string destination, bool move, SourceLineNumber sourceLineNumbers = null); | ||
21 | |||
22 | /// <summary> | ||
23 | /// Creates a tracked file. | ||
24 | /// </summary> | ||
25 | /// <param name="path">Destination path for the build output.</param> | ||
26 | /// <param name="type">Type of tracked file to create.</param> | ||
27 | /// <param name="sourceLineNumbers">Optional source line numbers that requested the tracked file.</param> | ||
28 | ITrackedFile TrackFile(string path, TrackedFileType type, SourceLineNumber sourceLineNumbers = null); | ||
29 | } | ||
30 | } | ||