diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/WixToolset.Core/CompilerCore.cs | 31 | ||||
-rw-r--r-- | src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs | 16 |
2 files changed, 46 insertions, 1 deletions
diff --git a/src/WixToolset.Core/CompilerCore.cs b/src/WixToolset.Core/CompilerCore.cs index 2f65db7a..d88858ae 100644 --- a/src/WixToolset.Core/CompilerCore.cs +++ b/src/WixToolset.Core/CompilerCore.cs | |||
@@ -381,6 +381,26 @@ namespace WixToolset.Core | |||
381 | /// </summary> | 381 | /// </summary> |
382 | /// <param name="sourceLineNumbers">Source line information for the row.</param> | 382 | /// <param name="sourceLineNumbers">Source line information for the row.</param> |
383 | /// <param name="symbolName">The symbol name of the simple reference.</param> | 383 | /// <param name="symbolName">The symbol name of the simple reference.</param> |
384 | /// <param name="primaryKey">The primary key of the simple reference.</param> | ||
385 | public void CreateSimpleReference(SourceLineNumber sourceLineNumbers, string symbolName, string primaryKey) | ||
386 | { | ||
387 | if (!this.EncounteredError) | ||
388 | { | ||
389 | var id = String.Concat(symbolName, ":", primaryKey); | ||
390 | |||
391 | // If this simple reference hasn't been added to the active section already, add it. | ||
392 | if (this.activeSectionSimpleReferences.Add(id)) | ||
393 | { | ||
394 | this.parseHelper.CreateSimpleReference(this.ActiveSection, sourceLineNumbers, symbolName, primaryKey); | ||
395 | } | ||
396 | } | ||
397 | } | ||
398 | |||
399 | /// <summary> | ||
400 | /// Create a WixSimpleReferenceSymbol in the active section. | ||
401 | /// </summary> | ||
402 | /// <param name="sourceLineNumbers">Source line information for the row.</param> | ||
403 | /// <param name="symbolName">The symbol name of the simple reference.</param> | ||
384 | /// <param name="primaryKeys">The primary keys of the simple reference.</param> | 404 | /// <param name="primaryKeys">The primary keys of the simple reference.</param> |
385 | public void CreateSimpleReference(SourceLineNumber sourceLineNumbers, string symbolName, params string[] primaryKeys) | 405 | public void CreateSimpleReference(SourceLineNumber sourceLineNumbers, string symbolName, params string[] primaryKeys) |
386 | { | 406 | { |
@@ -402,6 +422,17 @@ namespace WixToolset.Core | |||
402 | /// </summary> | 422 | /// </summary> |
403 | /// <param name="sourceLineNumbers">Source line information for the row.</param> | 423 | /// <param name="sourceLineNumbers">Source line information for the row.</param> |
404 | /// <param name="symbolDefinition">The symbol definition of the simple reference.</param> | 424 | /// <param name="symbolDefinition">The symbol definition of the simple reference.</param> |
425 | /// <param name="primaryKey">The primary key of the simple reference.</param> | ||
426 | public void CreateSimpleReference(SourceLineNumber sourceLineNumbers, IntermediateSymbolDefinition symbolDefinition, string primaryKey) | ||
427 | { | ||
428 | this.CreateSimpleReference(sourceLineNumbers, symbolDefinition.Name, primaryKey); | ||
429 | } | ||
430 | |||
431 | /// <summary> | ||
432 | /// Create a WixSimpleReferenceSymbol in the active section. | ||
433 | /// </summary> | ||
434 | /// <param name="sourceLineNumbers">Source line information for the row.</param> | ||
435 | /// <param name="symbolDefinition">The symbol definition of the simple reference.</param> | ||
405 | /// <param name="primaryKeys">The primary keys of the simple reference.</param> | 436 | /// <param name="primaryKeys">The primary keys of the simple reference.</param> |
406 | public void CreateSimpleReference(SourceLineNumber sourceLineNumbers, IntermediateSymbolDefinition symbolDefinition, params string[] primaryKeys) | 437 | public void CreateSimpleReference(SourceLineNumber sourceLineNumbers, IntermediateSymbolDefinition symbolDefinition, params string[] primaryKeys) |
407 | { | 438 | { |
diff --git a/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs b/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs index 7115017c..d9087ce3 100644 --- a/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs +++ b/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs | |||
@@ -225,6 +225,15 @@ namespace WixToolset.Core.ExtensibilityServices | |||
225 | return symbol.Id; | 225 | return symbol.Id; |
226 | } | 226 | } |
227 | 227 | ||
228 | public void CreateSimpleReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, string symbolName, string primaryKey) | ||
229 | { | ||
230 | section.AddSymbol(new WixSimpleReferenceSymbol(sourceLineNumbers) | ||
231 | { | ||
232 | Table = symbolName, | ||
233 | PrimaryKeys = primaryKey | ||
234 | }); | ||
235 | } | ||
236 | |||
228 | public void CreateSimpleReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, string symbolName, params string[] primaryKeys) | 237 | public void CreateSimpleReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, string symbolName, params string[] primaryKeys) |
229 | { | 238 | { |
230 | section.AddSymbol(new WixSimpleReferenceSymbol(sourceLineNumbers) | 239 | section.AddSymbol(new WixSimpleReferenceSymbol(sourceLineNumbers) |
@@ -234,6 +243,11 @@ namespace WixToolset.Core.ExtensibilityServices | |||
234 | }); | 243 | }); |
235 | } | 244 | } |
236 | 245 | ||
246 | public void CreateSimpleReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, IntermediateSymbolDefinition symbolDefinition, string primaryKey) | ||
247 | { | ||
248 | this.CreateSimpleReference(section, sourceLineNumbers, symbolDefinition.Name, primaryKey); | ||
249 | } | ||
250 | |||
237 | public void CreateSimpleReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, IntermediateSymbolDefinition symbolDefinition, params string[] primaryKeys) | 251 | public void CreateSimpleReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, IntermediateSymbolDefinition symbolDefinition, params string[] primaryKeys) |
238 | { | 252 | { |
239 | this.CreateSimpleReference(section, sourceLineNumbers, symbolDefinition.Name, primaryKeys); | 253 | this.CreateSimpleReference(section, sourceLineNumbers, symbolDefinition.Name, primaryKeys); |
@@ -849,7 +863,7 @@ namespace WixToolset.Core.ExtensibilityServices | |||
849 | } | 863 | } |
850 | else if (allowRelative) | 864 | else if (allowRelative) |
851 | { | 865 | { |
852 | return filename.IndexOfAny(Common.IllegalRelativeLongFilenameCharacters) == -1; | 866 | return filename.IndexOfAny(Common.IllegalRelativeLongFilenameCharacters) == -1; |
853 | } | 867 | } |
854 | else | 868 | else |
855 | { | 869 | { |