aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/Preprocess
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core/Preprocess')
-rw-r--r--src/WixToolset.Core/Preprocess/IfDefEventHandler.cs28
-rw-r--r--src/WixToolset.Core/Preprocess/IncludedFileEventHandler.cs43
-rw-r--r--src/WixToolset.Core/Preprocess/ProcessedStreamEventHandler.cs43
-rw-r--r--src/WixToolset.Core/Preprocess/ResolvedVariableEventHandler.cs25
4 files changed, 139 insertions, 0 deletions
diff --git a/src/WixToolset.Core/Preprocess/IfDefEventHandler.cs b/src/WixToolset.Core/Preprocess/IfDefEventHandler.cs
new file mode 100644
index 00000000..ff181d61
--- /dev/null
+++ b/src/WixToolset.Core/Preprocess/IfDefEventHandler.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.Core.Preprocess
4{
5 using System;
6 using WixToolset.Data;
7
8 public delegate void IfDefEventHandler(object sender, IfDefEventArgs e);
9
10 public class IfDefEventArgs : EventArgs
11 {
12 public IfDefEventArgs(SourceLineNumber sourceLineNumbers, bool isIfDef, bool isDefined, string variableName)
13 {
14 this.SourceLineNumbers = sourceLineNumbers;
15 this.IsIfDef = isIfDef;
16 this.IsDefined = isDefined;
17 this.VariableName = variableName;
18 }
19
20 public SourceLineNumber SourceLineNumbers { get; }
21
22 public bool IsDefined { get; }
23
24 public bool IsIfDef { get; }
25
26 public string VariableName { get; }
27 }
28}
diff --git a/src/WixToolset.Core/Preprocess/IncludedFileEventHandler.cs b/src/WixToolset.Core/Preprocess/IncludedFileEventHandler.cs
new file mode 100644
index 00000000..beba216d
--- /dev/null
+++ b/src/WixToolset.Core/Preprocess/IncludedFileEventHandler.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.Core.Preprocess
4{
5 using System;
6 using WixToolset.Data;
7
8 /// <summary>
9 /// Included file event handler delegate.
10 /// </summary>
11 /// <param name="sender">Sender of the message.</param>
12 /// <param name="ea">Arguments for the included file event.</param>
13 public delegate void IncludedFileEventHandler(object sender, IncludedFileEventArgs e);
14
15 /// <summary>
16 /// Event args for included file event.
17 /// </summary>
18 public class IncludedFileEventArgs : EventArgs
19 {
20 /// <summary>
21 /// Creates a new IncludedFileEventArgs.
22 /// </summary>
23 /// <param name="sourceLineNumbers">Source line numbers for the included file.</param>
24 /// <param name="fullName">The full path of the included file.</param>
25 public IncludedFileEventArgs(SourceLineNumber sourceLineNumbers, string fullName)
26 {
27 this.SourceLineNumbers = sourceLineNumbers;
28 this.FullName = fullName;
29 }
30
31 /// <summary>
32 /// Gets the full path of the included file.
33 /// </summary>
34 /// <value>The full path of the included file.</value>
35 public string FullName { get; }
36
37 /// <summary>
38 /// Gets the source line numbers.
39 /// </summary>
40 /// <value>The source line numbers.</value>
41 public SourceLineNumber SourceLineNumbers { get; }
42 }
43}
diff --git a/src/WixToolset.Core/Preprocess/ProcessedStreamEventHandler.cs b/src/WixToolset.Core/Preprocess/ProcessedStreamEventHandler.cs
new file mode 100644
index 00000000..434590d2
--- /dev/null
+++ b/src/WixToolset.Core/Preprocess/ProcessedStreamEventHandler.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.Core.Preprocess
4{
5 using System;
6 using System.Xml.Linq;
7
8 /// <summary>
9 /// Preprocessed output stream event handler delegate.
10 /// </summary>
11 /// <param name="sender">Sender of the message.</param>
12 /// <param name="ea">Arguments for the preprocessed stream event.</param>
13 public delegate void ProcessedStreamEventHandler(object sender, ProcessedStreamEventArgs e);
14
15 /// <summary>
16 /// Event args for preprocessed stream event.
17 /// </summary>
18 public class ProcessedStreamEventArgs : EventArgs
19 {
20 /// <summary>
21 /// Creates a new ProcessedStreamEventArgs.
22 /// </summary>
23 /// <param name="sourceFile">Source file that is preprocessed.</param>
24 /// <param name="document">Preprocessed output document.</param>
25 public ProcessedStreamEventArgs(string sourceFile, XDocument document)
26 {
27 this.SourceFile = sourceFile;
28 this.Document = document;
29 }
30
31 /// <summary>
32 /// Gets the full path of the source file.
33 /// </summary>
34 /// <value>The full path of the source file.</value>
35 public string SourceFile { get; private set; }
36
37 /// <summary>
38 /// Gets the preprocessed output stream.
39 /// </summary>
40 /// <value>The the preprocessed output stream.</value>
41 public XDocument Document { get; private set; }
42 }
43}
diff --git a/src/WixToolset.Core/Preprocess/ResolvedVariableEventHandler.cs b/src/WixToolset.Core/Preprocess/ResolvedVariableEventHandler.cs
new file mode 100644
index 00000000..df3a7e6a
--- /dev/null
+++ b/src/WixToolset.Core/Preprocess/ResolvedVariableEventHandler.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.Core.Preprocess
4{
5 using System;
6 using WixToolset.Data;
7
8 public delegate void ResolvedVariableEventHandler(object sender, ResolvedVariableEventArgs e);
9
10 public class ResolvedVariableEventArgs : EventArgs
11 {
12 public ResolvedVariableEventArgs(SourceLineNumber sourceLineNumbers, string variableName, string variableValue)
13 {
14 this.SourceLineNumbers = sourceLineNumbers;
15 this.VariableName = variableName;
16 this.VariableValue = variableValue;
17 }
18
19 public SourceLineNumber SourceLineNumbers { get; }
20
21 public string VariableName { get; }
22
23 public string VariableValue { get; }
24 }
25}