From a864b587decaee4da3afc8415fe0f42e53b32a28 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 5 Apr 2020 14:46:55 +1000 Subject: Fix IParseHelper docs when tableName was supposed to be tupleName and provide overloads for table/tuple definitions. --- .../Services/IParseHelper.cs | 67 ++++++++++++++-------- 1 file changed, 43 insertions(+), 24 deletions(-) diff --git a/src/WixToolset.Extensibility/Services/IParseHelper.cs b/src/WixToolset.Extensibility/Services/IParseHelper.cs index 946abbcb..458e1e68 100644 --- a/src/WixToolset.Extensibility/Services/IParseHelper.cs +++ b/src/WixToolset.Extensibility/Services/IParseHelper.cs @@ -7,6 +7,7 @@ namespace WixToolset.Extensibility.Services using System.Xml.Linq; using WixToolset.Data; using WixToolset.Data.Tuples; + using WixToolset.Data.WindowsInstaller; using WixToolset.Extensibility.Data; /// @@ -38,26 +39,29 @@ namespace WixToolset.Extensibility.Services Identifier CreateIdentifierFromFilename(string filename); /// - /// Creates a row in the section. + /// Creates a tuple in the section. /// /// Section to add the new tuple to. - /// Source and line number of current row. - /// Name of table to create row in. - /// Optional identifier for the row. - /// New row. - IntermediateTuple CreateTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName, Identifier identifier = null); - - [Obsolete] - IntermediateTuple CreateRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName, Identifier identifier = null); + /// Source and line number of current tuple. + /// Name of tuple definition. + /// Optional identifier for the tuple. + /// New tuple. + IntermediateTuple CreateTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tupleName, Identifier identifier = null); /// - /// Creates a row in the section. + /// Creates a tuple in the section. /// /// Section to add the new tuple to. - /// Source and line number of current row. - /// Type of tuple to create. - /// Optional identifier for the row. - /// New row. + /// Source and line number of current tuple. + /// Tuple definition to create from. + /// Optional identifier for the tuple. + /// New tuple. + IntermediateTuple CreateTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, IntermediateTupleDefinition tupleDefinition, Identifier identifier = null); + + [Obsolete] + IntermediateTuple CreateRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName, Identifier identifier = null); + + [Obsolete] IntermediateTuple CreateTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, TupleDefinitionType tupleType, Identifier identifier = null); [Obsolete] @@ -93,9 +97,9 @@ namespace WixToolset.Extensibility.Services string CreateDirectoryReferenceFromInlineSyntax(IntermediateSection section, SourceLineNumber sourceLineNumbers, string parentId, XAttribute attribute, ISet sectionInlinedDirectoryIds); /// - /// Creates a Registry row in the active section. + /// Creates a Registry tuple in the active section. /// - /// Source and line number of the current row. + /// Source and line number of the current tuple. /// The registry entry root. /// The registry entry key. /// The registry entry name. @@ -118,12 +122,20 @@ namespace WixToolset.Extensibility.Services string CreateShortName(string longName, bool keepExtension, bool allowWildcards, params string[] args); /// - /// Create a WixSimpleReference row in the active section. + /// Create a WixSimpleReference tuple in the active section. + /// + /// Source line information for the row. + /// The tuple name of the simple reference. + /// The primary keys of the simple reference. + void CreateSimpleReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tupleName, params string[] primaryKeys); + + /// + /// Create a WixSimpleReference tuple in the active section. /// /// Source line information for the row. - /// The table name of the simple reference. + /// The tuple definition of the simple reference. /// The primary keys of the simple reference. - void CreateSimpleReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName, params string[] primaryKeys); + void CreateSimpleReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, IntermediateTupleDefinition tupleDefinition, params string[] primaryKeys); /// /// Create a reference in the specified section for a custom action specialized for specific platforms, @@ -137,7 +149,7 @@ namespace WixToolset.Extensibility.Services void CreateCustomActionReference(SourceLineNumber sourceLineNumbers, IntermediateSection section, string customAction, Platform platform, CustomActionPlatforms supportedPlatforms); /// - /// Creates WixComplexReference and WixGroup rows in the active section. + /// Creates WixComplexReference and WixGroup tuples in the active section. /// /// Section to create the reference in. /// Source line information. @@ -150,7 +162,7 @@ namespace WixToolset.Extensibility.Services void CreateComplexReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, string parentLanguage, ComplexReferenceChildType childType, string childId, bool isPrimary); /// - /// A row in the WixGroup table is added for this child node and its parent node. + /// A tuple 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. @@ -164,10 +176,10 @@ namespace WixToolset.Extensibility.Services void CreateWixGroupRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType childType, string childId); /// - /// Creates a row in the WixSearch table. + /// Creates a tuple in the WixSearch table. /// /// Section to create the reference in. - /// Source line number for the parent element. + /// Source line number for the search element. /// Name of search element. /// Identifier of the search. /// The Burn variable to store the result into. @@ -194,12 +206,19 @@ namespace WixToolset.Extensibility.Services bool ContainsProperty(string possibleProperty); /// - /// Add the appropriate rows to make sure that the given table shows up in the resulting output. + /// Add the appropriate tuples to make sure that the given table shows up in the resulting output. /// /// Source line numbers. /// Name of the table to ensure existance of. void EnsureTable(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName); + /// + /// Add the appropriate tuples to make sure that the given table shows up in the resulting output. + /// + /// Source line numbers. + /// Definition of the table to ensure existance of. + void EnsureTable(IntermediateSection section, SourceLineNumber sourceLineNumbers, TableDefinition tableDefinition); + /// /// Get an attribute value and displays an error if the value is empty by default. /// -- cgit v1.2.3-55-g6feb