diff options
author | Rob Mensching <rob@firegiant.com> | 2018-07-19 00:58:00 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2018-07-21 07:36:59 -0700 |
commit | 2724cfee4c163f3297ee25edfd2372767cfd4945 (patch) | |
tree | 8cdda34c83bea014a586a491e3b4b187ad8f16da /src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs | |
parent | 4d40bef9cf51b8cff7e1f6a73fdf68b9722eb8a0 (diff) | |
download | wix-2724cfee4c163f3297ee25edfd2372767cfd4945.tar.gz wix-2724cfee4c163f3297ee25edfd2372767cfd4945.tar.bz2 wix-2724cfee4c163f3297ee25edfd2372767cfd4945.zip |
Move tool projects to Tools repo
Diffstat (limited to 'src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs')
-rw-r--r-- | src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs | 32 |
1 files changed, 32 insertions, 0 deletions
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 @@ | |||
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 | } | ||