diff options
Diffstat (limited to 'src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs')
-rw-r--r-- | src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs b/src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs index 4ee682d3..2818cde4 100644 --- a/src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs +++ b/src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs | |||
@@ -13,22 +13,21 @@ namespace Example.Extension | |||
13 | 13 | ||
14 | public override bool TryAddTupleToOutput(IntermediateSection section, IntermediateTuple tuple, WindowsInstallerData output, TableDefinitionCollection tableDefinitions) | 14 | public override bool TryAddTupleToOutput(IntermediateSection section, IntermediateTuple tuple, WindowsInstallerData output, TableDefinitionCollection tableDefinitions) |
15 | { | 15 | { |
16 | #if ALTERNATIVE_TO_USING_HELPER | 16 | if (ExampleTupleDefinitions.TryGetTupleType(tuple.Definition.Name, out var tupleType)) |
17 | switch (tuple.Definition.Name) | ||
18 | { | 17 | { |
19 | case ExampleTupleDefinitions.ExampleName: | 18 | switch (tupleType) |
20 | { | 19 | { |
21 | var row = this.BackendHelper.CreateRow(section, tuple, output, ExampleTableDefinitions.ExampleTable); | 20 | case ExampleTupleDefinitionType.Example: |
22 | row[0] = tuple[0].AsString(); | 21 | { |
23 | row[1] = tuple[1].AsString(); | 22 | var row = (ExampleRow)this.BackendHelper.CreateRow(section, tuple, output, ExampleTableDefinitions.ExampleTable); |
24 | } | 23 | row.Example = tuple.Id.Id; |
25 | return true; | 24 | row.Value = tuple[0].AsString(); |
25 | } | ||
26 | return true; | ||
27 | } | ||
26 | } | 28 | } |
27 | 29 | ||
28 | return false; | ||
29 | #else | ||
30 | return this.BackendHelper.TryAddTupleToOutputMatchingTableDefinitions(section, tuple, output, tableDefinitions); | 30 | return this.BackendHelper.TryAddTupleToOutputMatchingTableDefinitions(section, tuple, output, tableDefinitions); |
31 | #endif | ||
32 | } | 31 | } |
33 | } | 32 | } |
34 | } | 33 | } |