From 6d8b6f79b44b6a41a630aa3aad5a3c7f16701798 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sat, 11 Apr 2020 21:49:09 +1000 Subject: General cleanup. Try not to send strings to specify the tuple or table. Try to avoid using the Set method on tuples. Always create new tuples and add them to the section in the same line. --- src/test/Example.Extension/ExampleCompilerExtension.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/test') diff --git a/src/test/Example.Extension/ExampleCompilerExtension.cs b/src/test/Example.Extension/ExampleCompilerExtension.cs index 9f0abd4c..0005b1d5 100644 --- a/src/test/Example.Extension/ExampleCompilerExtension.cs +++ b/src/test/Example.Extension/ExampleCompilerExtension.cs @@ -157,10 +157,10 @@ namespace Example.Extension if (!this.Messaging.EncounteredError) { - - var tuple = new ExampleSearchTuple(sourceLineNumbers, id); - section.Tuples.Add(tuple); - tuple.SearchFor = searchFor; + var tuple = section.AddTuple(new ExampleSearchTuple(sourceLineNumbers, id) + { + SearchFor = searchFor, + }); } } @@ -176,7 +176,7 @@ namespace Example.Extension { case "Id": var refId = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "ExampleSearch", refId); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, ExampleTupleDefinitions.ExampleSearch, refId); break; default: this.ParseHelper.UnexpectedAttribute(element, attrib); -- cgit v1.2.3-55-g6feb