diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2020-04-11 21:49:09 +1000 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2020-04-12 12:46:21 +1000 |
commit | 6d8b6f79b44b6a41a630aa3aad5a3c7f16701798 (patch) | |
tree | b82ede9934cb7777a19e74a912c68481e76c21cd /src/test | |
parent | df69d4172d3117d8b66ba51fa5ae7f4be538700d (diff) | |
download | wix-6d8b6f79b44b6a41a630aa3aad5a3c7f16701798.tar.gz wix-6d8b6f79b44b6a41a630aa3aad5a3c7f16701798.tar.bz2 wix-6d8b6f79b44b6a41a630aa3aad5a3c7f16701798.zip |
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.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/Example.Extension/ExampleCompilerExtension.cs | 10 |
1 files changed, 5 insertions, 5 deletions
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 | |||
157 | 157 | ||
158 | if (!this.Messaging.EncounteredError) | 158 | if (!this.Messaging.EncounteredError) |
159 | { | 159 | { |
160 | 160 | var tuple = section.AddTuple(new ExampleSearchTuple(sourceLineNumbers, id) | |
161 | var tuple = new ExampleSearchTuple(sourceLineNumbers, id); | 161 | { |
162 | section.Tuples.Add(tuple); | 162 | SearchFor = searchFor, |
163 | tuple.SearchFor = searchFor; | 163 | }); |
164 | } | 164 | } |
165 | } | 165 | } |
166 | 166 | ||
@@ -176,7 +176,7 @@ namespace Example.Extension | |||
176 | { | 176 | { |
177 | case "Id": | 177 | case "Id": |
178 | var refId = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 178 | var refId = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
179 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "ExampleSearch", refId); | 179 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, ExampleTupleDefinitions.ExampleSearch, refId); |
180 | break; | 180 | break; |
181 | default: | 181 | default: |
182 | this.ParseHelper.UnexpectedAttribute(element, attrib); | 182 | this.ParseHelper.UnexpectedAttribute(element, attrib); |