diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2020-04-12 11:19:14 +1000 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2020-04-12 12:46:21 +1000 |
commit | 148ad02da05070245c8345d6650e2a70bd4706be (patch) | |
tree | 819c60d1c2b19848fb12bae9d9f7e009db387a43 /src/test | |
parent | 6d8b6f79b44b6a41a630aa3aad5a3c7f16701798 (diff) | |
download | wix-148ad02da05070245c8345d6650e2a70bd4706be.tar.gz wix-148ad02da05070245c8345d6650e2a70bd4706be.tar.bz2 wix-148ad02da05070245c8345d6650e2a70bd4706be.zip |
Merge and move default tuple logic from CreateOutputFromIRCommand to WindowsInstallerBackendHelper.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs b/src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs index af9c8489..4ee682d3 100644 --- a/src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs +++ b/src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs | |||
@@ -11,15 +11,14 @@ namespace Example.Extension | |||
11 | { | 11 | { |
12 | public override IEnumerable<TableDefinition> TableDefinitions => ExampleTableDefinitions.All; | 12 | public override IEnumerable<TableDefinition> TableDefinitions => ExampleTableDefinitions.All; |
13 | 13 | ||
14 | public override bool TryAddTupleToOutput(IntermediateTuple tuple, WindowsInstallerData output) | 14 | public override bool TryAddTupleToOutput(IntermediateSection section, IntermediateTuple tuple, WindowsInstallerData output, TableDefinitionCollection tableDefinitions) |
15 | { | 15 | { |
16 | #if ALTERNATIVE_TO_USING_HELPER | 16 | #if ALTERNATIVE_TO_USING_HELPER |
17 | switch (tuple.Definition.Name) | 17 | switch (tuple.Definition.Name) |
18 | { | 18 | { |
19 | case TupleDefinitions.ExampleName: | 19 | case ExampleTupleDefinitions.ExampleName: |
20 | { | 20 | { |
21 | var table = output.EnsureTable(ExampleTableDefinitions.ExampleTable); | 21 | var row = this.BackendHelper.CreateRow(section, tuple, output, ExampleTableDefinitions.ExampleTable); |
22 | var row = table.CreateRow(tuple.SourceLineNumbers); | ||
23 | row[0] = tuple[0].AsString(); | 22 | row[0] = tuple[0].AsString(); |
24 | row[1] = tuple[1].AsString(); | 23 | row[1] = tuple[1].AsString(); |
25 | } | 24 | } |
@@ -28,7 +27,7 @@ namespace Example.Extension | |||
28 | 27 | ||
29 | return false; | 28 | return false; |
30 | #else | 29 | #else |
31 | return this.BackendHelper.TryAddTupleToOutputMatchingTableDefinitions(tuple, output, ExampleTableDefinitions.All); | 30 | return this.BackendHelper.TryAddTupleToOutputMatchingTableDefinitions(section, tuple, output, tableDefinitions); |
32 | #endif | 31 | #endif |
33 | } | 32 | } |
34 | } | 33 | } |