Fix IParseHelper docs when tableName was supposed to be tupleName and provide overloads for table/tuple definitions.
Fix IParseHelper docs when tableName was supposed to be tupleName and provide overloads for table/tuple definitions.
Sean Hall committed
Apr 5, 2020 at 14:46 UTC
a864b587decaee4da3afc8415fe0f42e53b32a28
1 file changed
+43
-24
src/WixToolset.Extensibility/Services/IParseHelper.cs
+43
-24
@@ -7,6 +7,7 @@ namespace WixToolset.Extensibility.Services
7
using System.Xml.Linq;
8
using WixToolset.Data;
9
using WixToolset.Data.Tuples;
10
+ using WixToolset.Data.WindowsInstaller;
11
using WixToolset.Extensibility.Data;
12
13
/// <summary>
@@ -38,26 +39,29 @@ namespace WixToolset.Extensibility.Services
39
Identifier CreateIdentifierFromFilename(string filename);
40
41
/// <summary>
41
- /// Creates a row in the section.
42
+ /// Creates a tuple in the section.
43
/// </summary>
44
/// <param name="section">Section to add the new tuple to.</param>
44
- /// <param name="sourceLineNumbers">Source and line number of current row.</param>
45
- /// <param name="tableName">Name of table to create row in.</param>
46
- /// <param name="identifier">Optional identifier for the row.</param>
47
- /// <returns>New row.</returns>
48
- IntermediateTuple CreateTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName, Identifier identifier = null);
49
-
50
- [Obsolete]
51
- IntermediateTuple CreateRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName, Identifier identifier = null);
45
+ /// <param name="sourceLineNumbers">Source and line number of current tuple.</param>
46
+ /// <param name="tupleName">Name of tuple definition.</param>
47
+ /// <param name="identifier">Optional identifier for the tuple.</param>
48
+ /// <returns>New tuple.</returns>
49
+ IntermediateTuple CreateTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tupleName, Identifier identifier = null);
50
51
/// <summary>
54
- /// Creates a row in the section.
52
+ /// Creates a tuple in the section.
53
/// </summary>
54
/// <param name="section">Section to add the new tuple to.</param>
57
- /// <param name="sourceLineNumbers">Source and line number of current row.</param>
58
- /// <param name="tupleType">Type of tuple to create.</param>
59
- /// <param name="identifier">Optional identifier for the row.</param>
60
- /// <returns>New row.</returns>
55
+ /// <param name="sourceLineNumbers">Source and line number of current tuple.</param>
56
+ /// <param name="tupleDefinition">Tuple definition to create from.</param>
57
+ /// <param name="identifier">Optional identifier for the tuple.</param>
58
+ /// <returns>New tuple.</returns>
59
+ IntermediateTuple CreateTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, IntermediateTupleDefinition tupleDefinition, Identifier identifier = null);
60
+
61
+ [Obsolete]
62
+ IntermediateTuple CreateRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName, Identifier identifier = null);
63
+
64
+ [Obsolete]
65
IntermediateTuple CreateTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, TupleDefinitionType tupleType, Identifier identifier = null);
66
67
[Obsolete]
@@ -93,9 +97,9 @@ namespace WixToolset.Extensibility.Services
97
string CreateDirectoryReferenceFromInlineSyntax(IntermediateSection section, SourceLineNumber sourceLineNumbers, string parentId, XAttribute attribute, ISet<string> sectionInlinedDirectoryIds);
98
99
/// <summary>
96
- /// Creates a Registry row in the active section.
100
+ /// Creates a Registry tuple in the active section.
101
/// </summary>
98
- /// <param name="sourceLineNumbers">Source and line number of the current row.</param>
102
+ /// <param name="sourceLineNumbers">Source and line number of the current tuple.</param>
103
/// <param name="root">The registry entry root.</param>
104
/// <param name="key">The registry entry key.</param>
105
/// <param name="name">The registry entry name.</param>
@@ -118,12 +122,20 @@ namespace WixToolset.Extensibility.Services
122
string CreateShortName(string longName, bool keepExtension, bool allowWildcards, params string[] args);
123
124
/// <summary>
121
- /// Create a WixSimpleReference row in the active section.
125
+ /// Create a WixSimpleReference tuple in the active section.
126
+ /// </summary>
127
+ /// <param name="sourceLineNumbers">Source line information for the row.</param>
128
+ /// <param name="tupleName">The tuple name of the simple reference.</param>
129
+ /// <param name="primaryKeys">The primary keys of the simple reference.</param>
130
+ void CreateSimpleReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tupleName, params string[] primaryKeys);
131
+
132
+ /// <summary>
133
+ /// Create a WixSimpleReference tuple in the active section.
134
/// </summary>
135
/// <param name="sourceLineNumbers">Source line information for the row.</param>
124
- /// <param name="tableName">The table name of the simple reference.</param>
136
+ /// <param name="tupleDefinition">The tuple definition of the simple reference.</param>
137
/// <param name="primaryKeys">The primary keys of the simple reference.</param>
126
- void CreateSimpleReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName, params string[] primaryKeys);
138
+ void CreateSimpleReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, IntermediateTupleDefinition tupleDefinition, params string[] primaryKeys);
139
140
/// <summary>
141
/// Create a reference in the specified section for a custom action specialized for specific platforms,
@@ -137,7 +149,7 @@ namespace WixToolset.Extensibility.Services
149
void CreateCustomActionReference(SourceLineNumber sourceLineNumbers, IntermediateSection section, string customAction, Platform platform, CustomActionPlatforms supportedPlatforms);
150
151
/// <summary>
140
- /// Creates WixComplexReference and WixGroup rows in the active section.
152
+ /// Creates WixComplexReference and WixGroup tuples in the active section.
153
/// </summary>
154
/// <param name="section">Section to create the reference in.</param>
155
/// <param name="sourceLineNumbers">Source line information.</param>
@@ -150,7 +162,7 @@ namespace WixToolset.Extensibility.Services
162
void CreateComplexReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, string parentLanguage, ComplexReferenceChildType childType, string childId, bool isPrimary);
163
164
/// <summary>
153
- /// A row in the WixGroup table is added for this child node and its parent node.
165
+ /// A tuple in the WixGroup table is added for this child node and its parent node.
166
/// </summary>
167
/// <param name="section">Section to create the reference in.</param>
168
/// <param name="sourceLineNumbers">Source line information for the row.</param>
@@ -164,10 +176,10 @@ namespace WixToolset.Extensibility.Services
176
void CreateWixGroupRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType childType, string childId);
177
178
/// <summary>
167
- /// Creates a row in the WixSearch table.
179
+ /// Creates a tuple in the WixSearch table.
180
/// </summary>
181
/// <param name="section">Section to create the reference in.</param>
170
- /// <param name="sourceLineNumbers">Source line number for the parent element.</param>
182
+ /// <param name="sourceLineNumbers">Source line number for the search element.</param>
183
/// <param name="elementName">Name of search element.</param>
184
/// <param name="id">Identifier of the search.</param>
185
/// <param name="variable">The Burn variable to store the result into.</param>
@@ -194,12 +206,19 @@ namespace WixToolset.Extensibility.Services
206
bool ContainsProperty(string possibleProperty);
207
208
/// <summary>
197
- /// Add the appropriate rows to make sure that the given table shows up in the resulting output.
209
+ /// Add the appropriate tuples to make sure that the given table shows up in the resulting output.
210
/// </summary>
211
/// <param name="sourceLineNumbers">Source line numbers.</param>
212
/// <param name="tableName">Name of the table to ensure existance of.</param>
213
void EnsureTable(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName);
214
215
+ /// <summary>
216
+ /// Add the appropriate tuples to make sure that the given table shows up in the resulting output.
217
+ /// </summary>
218
+ /// <param name="sourceLineNumbers">Source line numbers.</param>
219
+ /// <param name="tableDefinition">Definition of the table to ensure existance of.</param>
220
+ void EnsureTable(IntermediateSection section, SourceLineNumber sourceLineNumbers, TableDefinition tableDefinition);
221
+
222
/// <summary>
223
/// Get an attribute value and displays an error if the value is empty by default.
224
/// </summary>