From 1adf923b34d49a9a8fa2d18b931e545224388c9c Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 27 Mar 2020 13:34:34 +1000 Subject: Add helper methods in IParseHelper for creating WixSearches. Create BaseBurnBackendExtension. --- .../BaseBurnBackendExtension.cs | 28 ++++++++++++++++++++++ .../Services/IParseHelper.cs | 25 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 src/WixToolset.Extensibility/BaseBurnBackendExtension.cs (limited to 'src') diff --git a/src/WixToolset.Extensibility/BaseBurnBackendExtension.cs b/src/WixToolset.Extensibility/BaseBurnBackendExtension.cs new file mode 100644 index 00000000..f94ed1af --- /dev/null +++ b/src/WixToolset.Extensibility/BaseBurnBackendExtension.cs @@ -0,0 +1,28 @@ +// 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. + +namespace WixToolset.Extensibility +{ + using WixToolset.Data; + using WixToolset.Extensibility.Data; + + public class BaseBurnBackendExtension : IBurnBackendExtension + { + public virtual void PostBackendBind(IBindResult result) + { + } + + public virtual void PreBackendBind(IBindContext context) + { + } + + public virtual IResolveFileResult ResolveRelatedFile(string source, string relatedSource, string type, SourceLineNumber sourceLineNumbers, BindStage bindStage) + { + return null; + } + + public virtual string ResolveUrl(string url, string fallbackUrl, string packageId, string payloadId, string fileName) + { + return null; + } + } +} diff --git a/src/WixToolset.Extensibility/Services/IParseHelper.cs b/src/WixToolset.Extensibility/Services/IParseHelper.cs index a8f8da4f..946abbcb 100644 --- a/src/WixToolset.Extensibility/Services/IParseHelper.cs +++ b/src/WixToolset.Extensibility/Services/IParseHelper.cs @@ -139,6 +139,7 @@ namespace WixToolset.Extensibility.Services /// /// Creates WixComplexReference and WixGroup rows in the active section. /// + /// Section to create the reference in. /// Source line information. /// The parent type. /// The parent id. @@ -151,6 +152,7 @@ namespace WixToolset.Extensibility.Services /// /// A row in the WixGroup table is added for this child node and its parent node. /// + /// Section to create the reference in. /// Source line information for the row. /// Type of child's complex reference parent. /// Id of the parenet node. @@ -161,6 +163,29 @@ namespace WixToolset.Extensibility.Services [Obsolete] void CreateWixGroupRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType childType, string childId); + /// + /// Creates a row in the WixSearch table. + /// + /// Section to create the reference in. + /// Source line number for the parent element. + /// Name of search element. + /// Identifier of the search. + /// The Burn variable to store the result into. + /// A condition to test before evaluating the search. + /// The search that this one will execute after. + /// The id of the bundle extension that handles this search. + void CreateWixSearchTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, string elementName, Identifier id, string variable, string condition, string after, string bundleExtensionId); + + /// + /// + /// + /// Section to create the reference in. + /// Source line number for the parent element. + /// Identifier of the search (key into the WixSearch table) + /// Identifier of the search that comes before (key into the WixSearch table) + /// Further details about the relation between id and parentId. + void CreateWixSearchRelationTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier id, string parentId, int attributes); + /// /// Checks if the string contains a property (i.e. "foo[Property]bar") /// -- cgit v1.2.3-55-g6feb