diff options
Diffstat (limited to 'src/test/TestData/Example.Extension/ExampleWindowsInstallerBackendExtension.cs')
| -rw-r--r-- | src/test/TestData/Example.Extension/ExampleWindowsInstallerBackendExtension.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/test/TestData/Example.Extension/ExampleWindowsInstallerBackendExtension.cs b/src/test/TestData/Example.Extension/ExampleWindowsInstallerBackendExtension.cs new file mode 100644 index 00000000..f00a5102 --- /dev/null +++ b/src/test/TestData/Example.Extension/ExampleWindowsInstallerBackendExtension.cs | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace Example.Extension | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.Data.WindowsInstaller; | ||
| 7 | using WixToolset.Extensibility; | ||
| 8 | |||
| 9 | internal class ExampleWindowsInstallerBackendExtension : BaseWindowsInstallerBackendExtension | ||
| 10 | { | ||
| 11 | public override bool TryAddTupleToOutput(IntermediateTuple tuple, Output output) | ||
| 12 | { | ||
| 13 | #if ALTERNATIVE_TO_USING_HELPER | ||
| 14 | switch (tuple.Definition.Name) | ||
| 15 | { | ||
| 16 | case TupleDefinitions.ExampleName: | ||
| 17 | { | ||
| 18 | var table = output.EnsureTable(ExampleTableDefinitions.ExampleTable); | ||
| 19 | var row = table.CreateRow(tuple.SourceLineNumbers); | ||
| 20 | row[0] = tuple[0].AsString(); | ||
| 21 | row[1] = tuple[1].AsString(); | ||
| 22 | } | ||
| 23 | return true; | ||
| 24 | } | ||
| 25 | |||
| 26 | return false; | ||
| 27 | #else | ||
| 28 | return this.BackendHelper.TryAddTupleToOutputMatchingTableDefinitions(tuple, output, ExampleTableDefinitions.All); | ||
| 29 | #endif | ||
| 30 | } | ||
| 31 | } | ||
| 32 | } | ||
