aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Extensibility/Data
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2018-07-23 13:46:09 -0700
committerRob Mensching <rob@firegiant.com>2018-07-23 13:46:09 -0700
commite130a7a296696e3a7b1229cf580de393b3f20cbd (patch)
treec7677e1fcb88bfd88b9a314ccc23d987f8bbc870 /src/WixToolset.Extensibility/Data
parentd3da4f5cc6f07376a783ba4bdd03c3bb8dc5e480 (diff)
downloadwix-e130a7a296696e3a7b1229cf580de393b3f20cbd.tar.gz
wix-e130a7a296696e3a7b1229cf580de393b3f20cbd.tar.bz2
wix-e130a7a296696e3a7b1229cf580de393b3f20cbd.zip
Reorganize data into Extensibility.Data namespace
Diffstat (limited to 'src/WixToolset.Extensibility/Data')
-rw-r--r--src/WixToolset.Extensibility/Data/BindFileWithPath.cs20
-rw-r--r--src/WixToolset.Extensibility/Data/BindPath.cs59
-rw-r--r--src/WixToolset.Extensibility/Data/BindResult.cs13
-rw-r--r--src/WixToolset.Extensibility/Data/BindStage.cs22
-rw-r--r--src/WixToolset.Extensibility/Data/CabinetBuildOption.cs25
-rw-r--r--src/WixToolset.Extensibility/Data/ComponentKeyPath.cs55
-rw-r--r--src/WixToolset.Extensibility/Data/ExtensionCommandLineSwitch.cs14
-rw-r--r--src/WixToolset.Extensibility/Data/FileTransfer.cs114
-rw-r--r--src/WixToolset.Extensibility/Data/IBindContext.cs43
-rw-r--r--src/WixToolset.Extensibility/Data/ICommandLineArguments.cs23
-rw-r--r--src/WixToolset.Extensibility/Data/ICommandLineCommand.cs9
-rw-r--r--src/WixToolset.Extensibility/Data/ICommandLineContext.cs16
-rw-r--r--src/WixToolset.Extensibility/Data/ICompileContext.cs28
-rw-r--r--src/WixToolset.Extensibility/Data/IDelayedField.cs13
-rw-r--r--src/WixToolset.Extensibility/Data/IExpectedExtractFile.cs15
-rw-r--r--src/WixToolset.Extensibility/Data/IFileSystemContext.cs22
-rw-r--r--src/WixToolset.Extensibility/Data/IInscribeContext.cs19
-rw-r--r--src/WixToolset.Extensibility/Data/ILayoutContext.cs26
-rw-r--r--src/WixToolset.Extensibility/Data/ILibraryContext.cs25
-rw-r--r--src/WixToolset.Extensibility/Data/ILinkContext.cs23
-rw-r--r--src/WixToolset.Extensibility/Data/IPreprocessContext.cs29
-rw-r--r--src/WixToolset.Extensibility/Data/IResolveContext.cs30
-rw-r--r--src/WixToolset.Extensibility/Data/IUnbindContext.cs23
-rw-r--r--src/WixToolset.Extensibility/Data/ResolveResult.cs18
-rw-r--r--src/WixToolset.Extensibility/Data/ResolvedCabinet.cs20
25 files changed, 704 insertions, 0 deletions
diff --git a/src/WixToolset.Extensibility/Data/BindFileWithPath.cs b/src/WixToolset.Extensibility/Data/BindFileWithPath.cs
new file mode 100644
index 00000000..d65ae1ba
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/BindFileWithPath.cs
@@ -0,0 +1,20 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 /// <summary>
6 /// Bind file with its path.
7 /// </summary>
8 public class BindFileWithPath
9 {
10 /// <summary>
11 /// Gets or sets the identifier of the file with this path.
12 /// </summary>
13 public string Id { get; set; }
14
15 /// <summary>
16 /// Gets or sets the file path.
17 /// </summary>
18 public string Path { get; set; }
19 }
20}
diff --git a/src/WixToolset.Extensibility/Data/BindPath.cs b/src/WixToolset.Extensibility/Data/BindPath.cs
new file mode 100644
index 00000000..3b0b73bb
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/BindPath.cs
@@ -0,0 +1,59 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 using System;
6
7 /// <summary>
8 /// Bind path representation.
9 /// </summary>
10 public class BindPath
11 {
12 /// <summary>
13 /// Creates an unnamed bind path.
14 /// </summary>
15 /// <param name="path">Path for the bind path.</param>
16 public BindPath(string path) : this(String.Empty, path, BindStage.Normal)
17 {
18 }
19
20 /// <summary>
21 /// Creates a named bind path.
22 /// </summary>
23 /// <param name="name">Name of the bind path.</param>
24 /// <param name="path">Path for the bind path.</param>
25 /// <param name="stage">Stage for the bind path.</param>
26 public BindPath(string name, string path, BindStage stage = BindStage.Normal)
27 {
28 this.Name = name;
29 this.Path = path;
30 this.Stage = stage;
31 }
32
33 /// <summary>
34 /// Name of the bind path or String.Empty if the path is unnamed.
35 /// </summary>
36 public string Name { get; set; }
37
38 /// <summary>
39 /// Path for the bind path.
40 /// </summary>
41 public string Path { get; set; }
42
43 /// <summary>
44 /// Stage for the bind path.
45 /// </summary>
46 public BindStage Stage { get; set; }
47
48 /// <summary>
49 /// Parses a normal bind path from its string representation
50 /// </summary>
51 /// <param name="bindPath">String representation of bind path that looks like: [name=]path</param>
52 /// <returns>Parsed normal bind path.</returns>
53 public static BindPath Parse(string bindPath)
54 {
55 string[] namedPath = bindPath.Split(new char[] { '=' }, 2);
56 return (1 == namedPath.Length) ? new BindPath(namedPath[0]) : new BindPath(namedPath[0], namedPath[1]);
57 }
58 }
59}
diff --git a/src/WixToolset.Extensibility/Data/BindResult.cs b/src/WixToolset.Extensibility/Data/BindResult.cs
new file mode 100644
index 00000000..ec97154f
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/BindResult.cs
@@ -0,0 +1,13 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 using System.Collections.Generic;
6
7 public class BindResult
8 {
9 public IEnumerable<FileTransfer> FileTransfers { get; set; }
10
11 public IEnumerable<string> ContentFilePaths { get; set; }
12 }
13}
diff --git a/src/WixToolset.Extensibility/Data/BindStage.cs b/src/WixToolset.Extensibility/Data/BindStage.cs
new file mode 100644
index 00000000..559a5a5a
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/BindStage.cs
@@ -0,0 +1,22 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 public enum BindStage
6 {
7 /// <summary>
8 /// Normal binding
9 /// </summary>
10 Normal,
11
12 /// <summary>
13 /// Bind the file path of the target build file
14 /// </summary>
15 Target,
16
17 /// <summary>
18 /// Bind the file path of the updated build file
19 /// </summary>
20 Updated,
21 }
22}
diff --git a/src/WixToolset.Extensibility/Data/CabinetBuildOption.cs b/src/WixToolset.Extensibility/Data/CabinetBuildOption.cs
new file mode 100644
index 00000000..f9938814
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/CabinetBuildOption.cs
@@ -0,0 +1,25 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 /// <summary>
6 /// Options for building the cabinet.
7 /// </summary>
8 public enum CabinetBuildOption
9 {
10 /// <summary>
11 /// Build the cabinet and move it to the target location.
12 /// </summary>
13 BuildAndMove,
14
15 /// <summary>
16 /// Build the cabinet and copy it to the target location.
17 /// </summary>
18 BuildAndCopy,
19
20 /// <summary>
21 /// Just copy the cabinet to the target location.
22 /// </summary>
23 Copy
24 }
25}
diff --git a/src/WixToolset.Extensibility/Data/ComponentKeyPath.cs b/src/WixToolset.Extensibility/Data/ComponentKeyPath.cs
new file mode 100644
index 00000000..112f562c
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/ComponentKeyPath.cs
@@ -0,0 +1,55 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 public enum ComponentKeyPathType
6 {
7 /// <summary>
8 /// Not a key path.
9 /// </summary>
10 None,
11
12 /// <summary>
13 /// File resource as a key path.
14 /// </summary>
15 File,
16
17 /// <summary>
18 /// Folder as a key path.
19 /// </summary>
20 Directory,
21
22 /// <summary>
23 /// ODBC data source as a key path.
24 /// </summary>
25 OdbcDataSource,
26
27 /// <summary>
28 /// A simple registry key acting as a key path.
29 /// </summary>
30 Registry,
31
32 /// <summary>
33 /// A registry key that contains a formatted property acting as a key path.
34 /// </summary>
35 RegistryFormatted
36 }
37
38 public class ComponentKeyPath
39 {
40 /// <summary>
41 /// Identifier of the resource to be a key path.
42 /// </summary>
43 public string Id { get; set; }
44
45 /// <summary>
46 /// Indicates whether the key path was explicitly set for this resource.
47 /// </summary>
48 public bool Explicit { get; set; }
49
50 /// <summary>
51 /// Type of resource to be the key path.
52 /// </summary>
53 public ComponentKeyPathType Type { get; set; }
54 }
55}
diff --git a/src/WixToolset.Extensibility/Data/ExtensionCommandLineSwitch.cs b/src/WixToolset.Extensibility/Data/ExtensionCommandLineSwitch.cs
new file mode 100644
index 00000000..d1d8f0c3
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/ExtensionCommandLineSwitch.cs
@@ -0,0 +1,14 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 /// <summary>
6 /// A command line option.
7 /// </summary>
8 public struct ExtensionCommandLineSwitch
9 {
10 public string Switch { get; set; }
11
12 public string Description { get; set; }
13 }
14}
diff --git a/src/WixToolset.Extensibility/Data/FileTransfer.cs b/src/WixToolset.Extensibility/Data/FileTransfer.cs
new file mode 100644
index 00000000..0356ac4c
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/FileTransfer.cs
@@ -0,0 +1,114 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 using System;
6 using System.IO;
7 using WixToolset.Data;
8
9 /// <summary>
10 /// Structure used for all file transfer information.
11 /// </summary>
12 public class FileTransfer
13 {
14 /// <summary>Source path to file.</summary>
15 public string Source { get; set; }
16
17 /// <summary>Destination path for file.</summary>
18 public string Destination { get; set; }
19
20 /// <summary>Flag if file should be moved (optimal).</summary>
21 public bool Move { get; set; }
22
23 /// <summary>Optional source line numbers where this file transfer orginated.</summary>
24 public SourceLineNumber SourceLineNumbers { get; set; }
25
26 /// <summary>Optional type of file this transfer is moving or copying.</summary>
27 public string Type { get; set; }
28
29 /// <summary>Indicates whether the file transer was a built by this build or copied from other some build.</summary>
30 public bool Built { get; set; }
31
32 /// <summary>Set during layout of media when the file transfer when the source and target resolve to the same path.</summary>
33 public bool Redundant { get; set; }
34
35 /// <summary>
36 /// Prefer the TryCreate() method to create FileTransfer objects.
37 /// </summary>
38 /// <param name="source">Source path to file.</param>
39 /// <param name="destination">Destination path for file.</param>
40 /// <param name="move">File if file should be moved (optimal).</param>
41 /// <param name="type">Optional type of file this transfer is transferring.</param>
42 /// <param name="sourceLineNumbers">Optional source line numbers wher this transfer originated.</param>
43 public FileTransfer(string source, string destination, bool move, string type = null, SourceLineNumber sourceLineNumbers = null)
44 {
45 this.Source = source;
46 this.Destination = destination;
47 this.Move = move;
48
49 this.Type = type;
50 this.SourceLineNumbers = sourceLineNumbers;
51 }
52
53 /// <summary>
54 /// Creates a file transfer if the source and destination are different.
55 /// </summary>
56 /// <param name="source">Source path to file.</param>
57 /// <param name="destination">Destination path for file.</param>
58 /// <param name="move">File if file should be moved (optimal).</param>
59 /// <param name="type">Optional type of file this transfer is transferring.</param>
60 /// <param name="sourceLineNumbers">Optional source line numbers where this transfer originated.</param>
61 /// <returns>true if the source and destination are the different, false if no file transfer is created.</returns>
62 public static bool TryCreate(string source, string destination, bool move, string type, SourceLineNumber sourceLineNumbers, out FileTransfer transfer)
63 {
64 //string sourceFullPath = GetValidatedFullPath(sourceLineNumbers, source);
65
66 //string fileLayoutFullPath = GetValidatedFullPath(sourceLineNumbers, destination);
67
68 ////// if the current source path (where we know that the file already exists) and the resolved
69 ////// path as dictated by the Directory table are not the same, then propagate the file. The
70 ////// image that we create may have already been done by some other process other than the linker, so
71 ////// there is no reason to copy the files to the resolved source if they are already there.
72 ////if (String.Equals(sourceFullPath, fileLayoutFullPath, StringComparison.OrdinalIgnoreCase))
73 ////{
74 //// transfer = null;
75 //// return false;
76 ////}
77
78 //transfer = new FileTransfer(source, destination, move, type, sourceLineNumbers);
79 //transfer.Redundant = String.Equals(sourceFullPath, fileLayoutFullPath, StringComparison.OrdinalIgnoreCase);
80 //return true;
81 throw new NotImplementedException();
82 }
83
84 //private static string GetValidatedFullPath(SourceLineNumber sourceLineNumbers, string path)
85 //{
86 // string result;
87
88 // try
89 // {
90 // result = Path.GetFullPath(path);
91
92 // var filename = Path.GetFileName(result);
93
94 // foreach (var reservedName in Common.ReservedFileNames)
95 // {
96 // if (reservedName.Equals(filename, StringComparison.OrdinalIgnoreCase))
97 // {
98 // throw new WixException(ErrorMessages.InvalidFileName(sourceLineNumbers, path));
99 // }
100 // }
101 // }
102 // catch (ArgumentException)
103 // {
104 // throw new WixException(ErrorMessages.InvalidFileName(sourceLineNumbers, path));
105 // }
106 // catch (PathTooLongException)
107 // {
108 // throw new WixException(ErrorMessages.PathTooLong(sourceLineNumbers, path));
109 // }
110
111 // return result;
112 //}
113 }
114}
diff --git a/src/WixToolset.Extensibility/Data/IBindContext.cs b/src/WixToolset.Extensibility/Data/IBindContext.cs
new file mode 100644
index 00000000..355b1a53
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/IBindContext.cs
@@ -0,0 +1,43 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 using System;
6 using System.Collections.Generic;
7 using WixToolset.Data;
8
9 public interface IBindContext
10 {
11 IServiceProvider ServiceProvider { get; }
12
13 int CabbingThreadCount { get; set; }
14
15 string CabCachePath { get; set; }
16
17 int Codepage { get; set; }
18
19 CompressionLevel? DefaultCompressionLevel { get; set; }
20
21 IEnumerable<IDelayedField> DelayedFields { get; set; }
22
23 IEnumerable<IExpectedExtractFile> ExpectedEmbeddedFiles { get; set; }
24
25 IEnumerable<IBinderExtension> Extensions { get; set; }
26
27 IEnumerable<IFileSystemExtension> FileSystemExtensions { get; set; }
28
29 IEnumerable<string> Ices { get; set; }
30
31 string IntermediateFolder { get; set; }
32
33 Intermediate IntermediateRepresentation { get; set; }
34
35 string OutputPath { get; set; }
36
37 string OutputPdbPath { get; set; }
38
39 IEnumerable<string> SuppressIces { get; set; }
40
41 bool SuppressValidation { get; set; }
42 }
43}
diff --git a/src/WixToolset.Extensibility/Data/ICommandLineArguments.cs b/src/WixToolset.Extensibility/Data/ICommandLineArguments.cs
new file mode 100644
index 00000000..5729ff36
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/ICommandLineArguments.cs
@@ -0,0 +1,23 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 using WixToolset.Extensibility.Services;
6
7 public interface ICommandLineArguments
8 {
9 string[] OriginalArguments { get; set; }
10
11 string[] Arguments { get; set; }
12
13 string[] Extensions { get; set; }
14
15 string ErrorArgument { get; set; }
16
17 void Populate(string commandLine);
18
19 void Populate(string[] args);
20
21 IParseCommandLine Parse();
22 }
23}
diff --git a/src/WixToolset.Extensibility/Data/ICommandLineCommand.cs b/src/WixToolset.Extensibility/Data/ICommandLineCommand.cs
new file mode 100644
index 00000000..1146d40a
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/ICommandLineCommand.cs
@@ -0,0 +1,9 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 public interface ICommandLineCommand
6 {
7 int Execute();
8 }
9}
diff --git a/src/WixToolset.Extensibility/Data/ICommandLineContext.cs b/src/WixToolset.Extensibility/Data/ICommandLineContext.cs
new file mode 100644
index 00000000..1b2db4a4
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/ICommandLineContext.cs
@@ -0,0 +1,16 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 using System;
6 using WixToolset.Extensibility.Services;
7
8 public interface ICommandLineContext
9 {
10 IServiceProvider ServiceProvider { get; }
11
12 IExtensionManager ExtensionManager { get; set; }
13
14 ICommandLineArguments Arguments { get; set; }
15 }
16}
diff --git a/src/WixToolset.Extensibility/Data/ICompileContext.cs b/src/WixToolset.Extensibility/Data/ICompileContext.cs
new file mode 100644
index 00000000..50ad10b9
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/ICompileContext.cs
@@ -0,0 +1,28 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 using System;
6 using System.Collections.Generic;
7 using System.Xml.Linq;
8 using WixToolset.Data;
9
10 public interface ICompileContext
11 {
12 IServiceProvider ServiceProvider { get; }
13
14 string CompilationId { get; set; }
15
16 IEnumerable<ICompilerExtension> Extensions { get; set; }
17
18 string OutputPath { get; set; }
19
20 /// <summary>
21 /// Gets or sets the platform which the compiler will use when defaulting 64-bit attributes and elements.
22 /// </summary>
23 /// <value>The platform which the compiler will use when defaulting 64-bit attributes and elements.</value>
24 Platform Platform { get; set; }
25
26 XDocument Source { get; set; }
27 }
28}
diff --git a/src/WixToolset.Extensibility/Data/IDelayedField.cs b/src/WixToolset.Extensibility/Data/IDelayedField.cs
new file mode 100644
index 00000000..5c078762
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/IDelayedField.cs
@@ -0,0 +1,13 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 using WixToolset.Data;
6
7 public interface IDelayedField
8 {
9 IntermediateField Field { get; }
10
11 IntermediateTuple Row { get; }
12 }
13} \ No newline at end of file
diff --git a/src/WixToolset.Extensibility/Data/IExpectedExtractFile.cs b/src/WixToolset.Extensibility/Data/IExpectedExtractFile.cs
new file mode 100644
index 00000000..edcf82e0
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/IExpectedExtractFile.cs
@@ -0,0 +1,15 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 using System;
6
7 public interface IExpectedExtractFile
8 {
9 Uri Uri { get; set; }
10
11 int EmbeddedFileIndex { get; set; }
12
13 string OutputPath { get; set; }
14 }
15} \ No newline at end of file
diff --git a/src/WixToolset.Extensibility/Data/IFileSystemContext.cs b/src/WixToolset.Extensibility/Data/IFileSystemContext.cs
new file mode 100644
index 00000000..86fc106c
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/IFileSystemContext.cs
@@ -0,0 +1,22 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 using System;
6 using WixToolset.Data;
7
8 public interface IFileSystemContext
9 {
10 IServiceProvider ServiceProvider { get; }
11
12 string CabCachePath { get; set; }
13
14 string IntermediateFolder { get; set; }
15
16 Intermediate IntermediateRepresentation { get; set; }
17
18 string OutputPath { get; set; }
19
20 string OutputPdbPath { get; set; }
21 }
22}
diff --git a/src/WixToolset.Extensibility/Data/IInscribeContext.cs b/src/WixToolset.Extensibility/Data/IInscribeContext.cs
new file mode 100644
index 00000000..4f13ba10
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/IInscribeContext.cs
@@ -0,0 +1,19 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 using System;
6
7 public interface IInscribeContext
8 {
9 IServiceProvider ServiceProvider { get; }
10
11 string InputFilePath { get; set; }
12
13 string IntermediateFolder { get; set; }
14
15 string OutputFile { get; set; }
16
17 string SignedEngineFile { get; set; }
18 }
19}
diff --git a/src/WixToolset.Extensibility/Data/ILayoutContext.cs b/src/WixToolset.Extensibility/Data/ILayoutContext.cs
new file mode 100644
index 00000000..c3555268
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/ILayoutContext.cs
@@ -0,0 +1,26 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 using System;
6 using System.Collections.Generic;
7
8 public interface ILayoutContext
9 {
10 IServiceProvider ServiceProvider { get; }
11
12 IEnumerable<ILayoutExtension> Extensions { get; set; }
13
14 IEnumerable<string> ContentFilePaths { get; set; }
15
16 IEnumerable<FileTransfer> FileTransfers { get; set; }
17
18 string ContentsFile { get; set; }
19
20 string OutputsFile { get; set; }
21
22 string BuiltOutputsFile { get; set; }
23
24 bool SuppressAclReset { get; set; }
25 }
26}
diff --git a/src/WixToolset.Extensibility/Data/ILibraryContext.cs b/src/WixToolset.Extensibility/Data/ILibraryContext.cs
new file mode 100644
index 00000000..08b4ed26
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/ILibraryContext.cs
@@ -0,0 +1,25 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 using System;
6 using System.Collections.Generic;
7 using WixToolset.Data;
8
9 public interface ILibraryContext
10 {
11 IServiceProvider ServiceProvider { get; }
12
13 bool BindFiles { get; set; }
14
15 IEnumerable<BindPath> BindPaths { get; set; }
16
17 IEnumerable<ILibrarianExtension> Extensions { get; set; }
18
19 string LibraryId { get; set; }
20
21 IEnumerable<Localization> Localizations { get; set; }
22
23 IEnumerable<Intermediate> Intermediates { get; set; }
24 }
25}
diff --git a/src/WixToolset.Extensibility/Data/ILinkContext.cs b/src/WixToolset.Extensibility/Data/ILinkContext.cs
new file mode 100644
index 00000000..8c1d6f22
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/ILinkContext.cs
@@ -0,0 +1,23 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 using System;
6 using System.Collections.Generic;
7 using WixToolset.Data;
8
9 public interface ILinkContext
10 {
11 IServiceProvider ServiceProvider { get; }
12
13 IEnumerable<ILinkerExtension> Extensions { get; set; }
14
15 IEnumerable<IExtensionData> ExtensionData { get; set; }
16
17 OutputType ExpectedOutputType { get; set; }
18
19 IEnumerable<Intermediate> Intermediates { get; set; }
20
21 ITupleDefinitionCreator TupleDefinitionCreator { get; set; }
22 }
23}
diff --git a/src/WixToolset.Extensibility/Data/IPreprocessContext.cs b/src/WixToolset.Extensibility/Data/IPreprocessContext.cs
new file mode 100644
index 00000000..a923c4db
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/IPreprocessContext.cs
@@ -0,0 +1,29 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 using System;
6 using System.Collections.Generic;
7 using WixToolset.Data;
8
9 public interface IPreprocessContext
10 {
11 IServiceProvider ServiceProvider { get; }
12
13 IEnumerable<IPreprocessorExtension> Extensions { get; set; }
14
15 IList<string> IncludeSearchPaths { get; set; }
16
17 /// <summary>
18 /// Gets the platform which the compiler will use when defaulting 64-bit attributes and elements.
19 /// </summary>
20 /// <value>The platform which the compiler will use when defaulting 64-bit attributes and elements.</value>
21 Platform Platform { get; set; }
22
23 string SourceFile { get; set; }
24
25 IDictionary<string, string> Variables { get; set; }
26
27 SourceLineNumber CurrentSourceLineNumber { get; set; }
28 }
29}
diff --git a/src/WixToolset.Extensibility/Data/IResolveContext.cs b/src/WixToolset.Extensibility/Data/IResolveContext.cs
new file mode 100644
index 00000000..0e12a534
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/IResolveContext.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
3namespace WixToolset.Extensibility.Data
4{
5 using System;
6 using System.Collections.Generic;
7 using WixToolset.Data;
8 using WixToolset.Extensibility.Services;
9
10 public interface IResolveContext
11 {
12 IServiceProvider ServiceProvider { get; }
13
14 IEnumerable<BindPath> BindPaths { get; set; }
15
16 IEnumerable<IResolverExtension> Extensions { get; set; }
17
18 IEnumerable<IExtensionData> ExtensionData { get; set; }
19
20 IEnumerable<string> FilterCultures { get; set; }
21
22 string IntermediateFolder { get; set; }
23
24 Intermediate IntermediateRepresentation { get; set; }
25
26 IEnumerable<Localization> Localizations { get; set; }
27
28 IVariableResolver VariableResolver { get; set; }
29 }
30}
diff --git a/src/WixToolset.Extensibility/Data/IUnbindContext.cs b/src/WixToolset.Extensibility/Data/IUnbindContext.cs
new file mode 100644
index 00000000..84dc5167
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/IUnbindContext.cs
@@ -0,0 +1,23 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 using System;
6
7 public interface IUnbindContext
8 {
9 IServiceProvider ServiceProvider { get; }
10
11 string ExportBasePath { get; set; }
12
13 string InputFilePath { get; set; }
14
15 string IntermediateFolder { get; set; }
16
17 bool IsAdminImage { get; set; }
18
19 bool SuppressDemodularization { get; set; }
20
21 bool SuppressExtractCabinets { get; set; }
22 }
23} \ No newline at end of file
diff --git a/src/WixToolset.Extensibility/Data/ResolveResult.cs b/src/WixToolset.Extensibility/Data/ResolveResult.cs
new file mode 100644
index 00000000..cdc9cfcc
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/ResolveResult.cs
@@ -0,0 +1,18 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 using System.Collections.Generic;
6 using WixToolset.Data;
7
8 public class ResolveResult
9 {
10 public int Codepage { get; set; }
11
12 public IEnumerable<IDelayedField> DelayedFields { get; set; }
13
14 public IEnumerable<IExpectedExtractFile> ExpectedEmbeddedFiles { get; set; }
15
16 public Intermediate IntermediateRepresentation { get; set; }
17 }
18} \ No newline at end of file
diff --git a/src/WixToolset.Extensibility/Data/ResolvedCabinet.cs b/src/WixToolset.Extensibility/Data/ResolvedCabinet.cs
new file mode 100644
index 00000000..047b7448
--- /dev/null
+++ b/src/WixToolset.Extensibility/Data/ResolvedCabinet.cs
@@ -0,0 +1,20 @@
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
3namespace WixToolset.Extensibility.Data
4{
5 /// <summary>
6 /// Data returned from build file manager ResolveCabinet callback.
7 /// </summary>
8 public class ResolvedCabinet
9 {
10 /// <summary>
11 /// Gets or sets the build option for the resolved cabinet.
12 /// </summary>
13 public CabinetBuildOption BuildOption { get; set; }
14
15 /// <summary>
16 /// Gets or sets the path for the resolved cabinet.
17 /// </summary>
18 public string Path { get; set; }
19 }
20}