From 2724cfee4c163f3297ee25edfd2372767cfd4945 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 19 Jul 2018 00:58:00 -0700 Subject: Move tool projects to Tools repo --- .../ExampleWindowsInstallerBackendExtension.cs | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs (limited to 'src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs') diff --git a/src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs b/src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs new file mode 100644 index 00000000..f00a5102 --- /dev/null +++ b/src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs @@ -0,0 +1,32 @@ +// 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. + +namespace Example.Extension +{ + using WixToolset.Data; + using WixToolset.Data.WindowsInstaller; + using WixToolset.Extensibility; + + internal class ExampleWindowsInstallerBackendExtension : BaseWindowsInstallerBackendExtension + { + public override bool TryAddTupleToOutput(IntermediateTuple tuple, Output output) + { +#if ALTERNATIVE_TO_USING_HELPER + switch (tuple.Definition.Name) + { + case TupleDefinitions.ExampleName: + { + var table = output.EnsureTable(ExampleTableDefinitions.ExampleTable); + var row = table.CreateRow(tuple.SourceLineNumbers); + row[0] = tuple[0].AsString(); + row[1] = tuple[1].AsString(); + } + return true; + } + + return false; +#else + return this.BackendHelper.TryAddTupleToOutputMatchingTableDefinitions(tuple, output, ExampleTableDefinitions.All); +#endif + } + } +} -- cgit v1.2.3-55-g6feb