diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/WixToolset.Extensibility/Services/IParseHelper.cs | 67 |
1 files 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 | |||
| 7 | using System.Xml.Linq; | 7 | using System.Xml.Linq; |
| 8 | using WixToolset.Data; | 8 | using WixToolset.Data; |
| 9 | using WixToolset.Data.Tuples; | 9 | using WixToolset.Data.Tuples; |
| 10 | using WixToolset.Data.WindowsInstaller; | ||
| 10 | using WixToolset.Extensibility.Data; | 11 | using WixToolset.Extensibility.Data; |
| 11 | 12 | ||
| 12 | /// <summary> | 13 | /// <summary> |
| @@ -38,26 +39,29 @@ namespace WixToolset.Extensibility.Services | |||
| 38 | Identifier CreateIdentifierFromFilename(string filename); | 39 | Identifier CreateIdentifierFromFilename(string filename); |
| 39 | 40 | ||
| 40 | /// <summary> | 41 | /// <summary> |
| 41 | /// Creates a row in the section. | 42 | /// Creates a tuple in the section. |
| 42 | /// </summary> | 43 | /// </summary> |
| 43 | /// <param name="section">Section to add the new tuple to.</param> | 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="sourceLineNumbers">Source and line number of current tuple.</param> |
| 45 | /// <param name="tableName">Name of table to create row in.</param> | 46 | /// <param name="tupleName">Name of tuple definition.</param> |
| 46 | /// <param name="identifier">Optional identifier for the row.</param> | 47 | /// <param name="identifier">Optional identifier for the tuple.</param> |
| 47 | /// <returns>New row.</returns> | 48 | /// <returns>New tuple.</returns> |
| 48 | IntermediateTuple CreateTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName, Identifier identifier = null); | 49 | IntermediateTuple CreateTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tupleName, Identifier identifier = null); |
| 49 | |||
| 50 | [Obsolete] | ||
| 51 | IntermediateTuple CreateRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName, Identifier identifier = null); | ||
| 52 | 50 | ||
| 53 | /// <summary> | 51 | /// <summary> |
| 54 | /// Creates a row in the section. | 52 | /// Creates a tuple in the section. |
| 55 | /// </summary> | 53 | /// </summary> |
| 56 | /// <param name="section">Section to add the new tuple to.</param> | 54 | /// <param name="section">Section to add the new tuple to.</param> |
| 57 | /// <param name="sourceLineNumbers">Source and line number of current row.</param> | 55 | /// <param name="sourceLineNumbers">Source and line number of current tuple.</param> |
| 58 | /// <param name="tupleType">Type of tuple to create.</param> | 56 | /// <param name="tupleDefinition">Tuple definition to create from.</param> |
| 59 | /// <param name="identifier">Optional identifier for the row.</param> | 57 | /// <param name="identifier">Optional identifier for the tuple.</param> |
| 60 | /// <returns>New row.</returns> | 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] | ||
| 61 | IntermediateTuple CreateTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, TupleDefinitionType tupleType, Identifier identifier = null); | 65 | IntermediateTuple CreateTuple(IntermediateSection section, SourceLineNumber sourceLineNumbers, TupleDefinitionType tupleType, Identifier identifier = null); |
| 62 | 66 | ||
| 63 | [Obsolete] | 67 | [Obsolete] |
| @@ -93,9 +97,9 @@ namespace WixToolset.Extensibility.Services | |||
| 93 | string CreateDirectoryReferenceFromInlineSyntax(IntermediateSection section, SourceLineNumber sourceLineNumbers, string parentId, XAttribute attribute, ISet<string> sectionInlinedDirectoryIds); | 97 | string CreateDirectoryReferenceFromInlineSyntax(IntermediateSection section, SourceLineNumber sourceLineNumbers, string parentId, XAttribute attribute, ISet<string> sectionInlinedDirectoryIds); |
| 94 | 98 | ||
| 95 | /// <summary> | 99 | /// <summary> |
| 96 | /// Creates a Registry row in the active section. | 100 | /// Creates a Registry tuple in the active section. |
| 97 | /// </summary> | 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> |
| 99 | /// <param name="root">The registry entry root.</param> | 103 | /// <param name="root">The registry entry root.</param> |
| 100 | /// <param name="key">The registry entry key.</param> | 104 | /// <param name="key">The registry entry key.</param> |
| 101 | /// <param name="name">The registry entry name.</param> | 105 | /// <param name="name">The registry entry name.</param> |
| @@ -118,12 +122,20 @@ namespace WixToolset.Extensibility.Services | |||
| 118 | string CreateShortName(string longName, bool keepExtension, bool allowWildcards, params string[] args); | 122 | string CreateShortName(string longName, bool keepExtension, bool allowWildcards, params string[] args); |
| 119 | 123 | ||
| 120 | /// <summary> | 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. | ||
| 122 | /// </summary> | 134 | /// </summary> |
| 123 | /// <param name="sourceLineNumbers">Source line information for the row.</param> | 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> |
| 125 | /// <param name="primaryKeys">The primary keys 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); |
| 127 | 139 | ||
| 128 | /// <summary> | 140 | /// <summary> |
| 129 | /// Create a reference in the specified section for a custom action specialized for specific platforms, | 141 | /// Create a reference in the specified section for a custom action specialized for specific platforms, |
| @@ -137,7 +149,7 @@ namespace WixToolset.Extensibility.Services | |||
| 137 | void CreateCustomActionReference(SourceLineNumber sourceLineNumbers, IntermediateSection section, string customAction, Platform platform, CustomActionPlatforms supportedPlatforms); | 149 | void CreateCustomActionReference(SourceLineNumber sourceLineNumbers, IntermediateSection section, string customAction, Platform platform, CustomActionPlatforms supportedPlatforms); |
| 138 | 150 | ||
| 139 | /// <summary> | 151 | /// <summary> |
| 140 | /// Creates WixComplexReference and WixGroup rows in the active section. | 152 | /// Creates WixComplexReference and WixGroup tuples in the active section. |
| 141 | /// </summary> | 153 | /// </summary> |
| 142 | /// <param name="section">Section to create the reference in.</param> | 154 | /// <param name="section">Section to create the reference in.</param> |
| 143 | /// <param name="sourceLineNumbers">Source line information.</param> | 155 | /// <param name="sourceLineNumbers">Source line information.</param> |
| @@ -150,7 +162,7 @@ namespace WixToolset.Extensibility.Services | |||
| 150 | void CreateComplexReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, string parentLanguage, ComplexReferenceChildType childType, string childId, bool isPrimary); | 162 | void CreateComplexReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, string parentLanguage, ComplexReferenceChildType childType, string childId, bool isPrimary); |
| 151 | 163 | ||
| 152 | /// <summary> | 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. |
| 154 | /// </summary> | 166 | /// </summary> |
| 155 | /// <param name="section">Section to create the reference in.</param> | 167 | /// <param name="section">Section to create the reference in.</param> |
| 156 | /// <param name="sourceLineNumbers">Source line information for the row.</param> | 168 | /// <param name="sourceLineNumbers">Source line information for the row.</param> |
| @@ -164,10 +176,10 @@ namespace WixToolset.Extensibility.Services | |||
| 164 | void CreateWixGroupRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType childType, string childId); | 176 | void CreateWixGroupRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType childType, string childId); |
| 165 | 177 | ||
| 166 | /// <summary> | 178 | /// <summary> |
| 167 | /// Creates a row in the WixSearch table. | 179 | /// Creates a tuple in the WixSearch table. |
| 168 | /// </summary> | 180 | /// </summary> |
| 169 | /// <param name="section">Section to create the reference in.</param> | 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> |
| 171 | /// <param name="elementName">Name of search element.</param> | 183 | /// <param name="elementName">Name of search element.</param> |
| 172 | /// <param name="id">Identifier of the search.</param> | 184 | /// <param name="id">Identifier of the search.</param> |
| 173 | /// <param name="variable">The Burn variable to store the result into.</param> | 185 | /// <param name="variable">The Burn variable to store the result into.</param> |
| @@ -194,13 +206,20 @@ namespace WixToolset.Extensibility.Services | |||
| 194 | bool ContainsProperty(string possibleProperty); | 206 | bool ContainsProperty(string possibleProperty); |
| 195 | 207 | ||
| 196 | /// <summary> | 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. |
| 198 | /// </summary> | 210 | /// </summary> |
| 199 | /// <param name="sourceLineNumbers">Source line numbers.</param> | 211 | /// <param name="sourceLineNumbers">Source line numbers.</param> |
| 200 | /// <param name="tableName">Name of the table to ensure existance of.</param> | 212 | /// <param name="tableName">Name of the table to ensure existance of.</param> |
| 201 | void EnsureTable(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName); | 213 | void EnsureTable(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName); |
| 202 | 214 | ||
| 203 | /// <summary> | 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> | ||
| 204 | /// Get an attribute value and displays an error if the value is empty by default. | 223 | /// Get an attribute value and displays an error if the value is empty by default. |
| 205 | /// </summary> | 224 | /// </summary> |
| 206 | /// <param name="sourceLineNumbers">Source line information about the owner element.</param> | 225 | /// <param name="sourceLineNumbers">Source line information about the owner element.</param> |
