Add helper methods in IParseHelper for creating WixSearches. Create BaseBurnBackendExtension.
Add helper methods in IParseHelper for creating WixSearches. Create BaseBurnBackendExtension.
Sean Hall committed
Mar 27, 2020 at 13:34 UTC
1adf923b34d49a9a8fa2d18b931e545224388c9c
2 files changed
+53
src/WixToolset.Extensibility/BaseBurnBackendExtension.cs
new
+28
@@ -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
+
3
+namespace WixToolset.Extensibility
4
+{
5
+ using WixToolset.Data;
6
+ using WixToolset.Extensibility.Data;
7
+
8
+ public class BaseBurnBackendExtension : IBurnBackendExtension
9
+ {
10
+ public virtual void PostBackendBind(IBindResult result)
11
+ {
12
+ }
13
+
14
+ public virtual void PreBackendBind(IBindContext context)
15
+ {
16
+ }
17
+
18
+ public virtual IResolveFileResult ResolveRelatedFile(string source, string relatedSource, string type, SourceLineNumber sourceLineNumbers, BindStage bindStage)
19
+ {
20
+ return null;
21
+ }
22
+
23
+ public virtual string ResolveUrl(string url, string fallbackUrl, string packageId, string payloadId, string fileName)
24
+ {
25
+ return null;
26
+ }
27
+ }
28
+}
src/WixToolset.Extensibility/Services/IParseHelper.cs
+25
@@ -139,6 +139,7 @@ namespace WixToolset.Extensibility.Services
139
/// <summary>
140
/// Creates WixComplexReference and WixGroup rows in the active section.
141
/// </summary>
142
+ /// <param name="section">Section to create the reference in.</param>
143
/// <param name="sourceLineNumbers">Source line information.</param>
144
/// <param name="parentType">The parent type.</param>
145
/// <param name="parentId">The parent id.</param>
@@ -151,6 +152,7 @@ namespace WixToolset.Extensibility.Services
152
/// <summary>
153
/// A row in the WixGroup table is added for this child node and its parent node.
154
/// </summary>
155
+ /// <param name="section">Section to create the reference in.</param>
156
/// <param name="sourceLineNumbers">Source line information for the row.</param>
157
/// <param name="parentType">Type of child's complex reference parent.</param>
158
/// <param name="parentId">Id of the parenet node.</param>
@@ -161,6 +163,29 @@ namespace WixToolset.Extensibility.Services
163
[Obsolete]
164
void CreateWixGroupRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType childType, string childId);
165
166
+ /// <summary>
167
+ /// Creates a row in the WixSearch table.
168
+ /// </summary>
169
+ /// <param name="section">Section to create the reference in.</param>
170
+ /// <param name="sourceLineNumbers">Source line number for the parent element.</param>
171
+ /// <param name="elementName">Name of search element.</param>
172
+ /// <param name="id">Identifier of the search.</param>
173
+ /// <param name="variable">The Burn variable to store the result into.</param>
174
+ /// <param name="condition">A condition to test before evaluating the search.</param>
175
+ /// <param name="after">The search that this one will execute after.</param>
176
+ /// <param name="bundleExtensionId">The id of the bundle extension that handles this search.</param>
177
+ void CreateWixSearchTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, string elementName, Identifier id, string variable, string condition, string after, string bundleExtensionId);
178
+
179
+ /// <summary>
180
+ ///
181
+ /// </summary>
182
+ /// <param name="section">Section to create the reference in.</param>
183
+ /// <param name="sourceLineNumbers">Source line number for the parent element.</param>
184
+ /// <param name="id">Identifier of the search (key into the WixSearch table)</param>
185
+ /// <param name="parentId">Identifier of the search that comes before (key into the WixSearch table)</param>
186
+ /// <param name="attributes">Further details about the relation between id and parentId.</param>
187
+ void CreateWixSearchRelationTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string parentId, int attributes);
188
+
189
/// <summary>
190
/// Checks if the string contains a property (i.e. "foo[Property]bar")
191
/// </summary>