diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-03-27 13:54:56 +1000 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-03-30 21:30:04 +1000 |
| commit | 0baf6e26ec7ab2ff0b6ad36e9d44f3d68819b5d6 (patch) | |
| tree | 1ef577d0246b662f4a8bda0ed935e987f03562a0 /src/test/Example.Extension/ExampleSearchTuple.cs | |
| parent | afbc6889c73d58136cb8851858ca3c17f41dc2c5 (diff) | |
| download | wix-0baf6e26ec7ab2ff0b6ad36e9d44f3d68819b5d6.tar.gz wix-0baf6e26ec7ab2ff0b6ad36e9d44f3d68819b5d6.tar.bz2 wix-0baf6e26ec7ab2ff0b6ad36e9d44f3d68819b5d6.zip | |
Add ability for extensions to create custom bundle searches.
This required creating BundleExtensionData.xml.
Diffstat (limited to 'src/test/Example.Extension/ExampleSearchTuple.cs')
| -rw-r--r-- | src/test/Example.Extension/ExampleSearchTuple.cs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/test/Example.Extension/ExampleSearchTuple.cs b/src/test/Example.Extension/ExampleSearchTuple.cs new file mode 100644 index 00000000..df34f0af --- /dev/null +++ b/src/test/Example.Extension/ExampleSearchTuple.cs | |||
| @@ -0,0 +1,31 @@ | |||
| 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 | |||
| 7 | public enum ExampleSearchTupleFields | ||
| 8 | { | ||
| 9 | Example, | ||
| 10 | SearchFor, | ||
| 11 | } | ||
| 12 | |||
| 13 | public class ExampleSearchTuple : IntermediateTuple | ||
| 14 | { | ||
| 15 | public ExampleSearchTuple() : base(ExampleTupleDefinitions.ExampleSearch, null, null) | ||
| 16 | { | ||
| 17 | } | ||
| 18 | |||
| 19 | public ExampleSearchTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ExampleTupleDefinitions.ExampleSearch, sourceLineNumber, id) | ||
| 20 | { | ||
| 21 | } | ||
| 22 | |||
| 23 | public IntermediateField this[ExampleTupleFields index] => this.Fields[(int)index]; | ||
| 24 | |||
| 25 | public string SearchFor | ||
| 26 | { | ||
| 27 | get => this.Fields[(int)ExampleSearchTupleFields.SearchFor]?.AsString(); | ||
| 28 | set => this.Set((int)ExampleSearchTupleFields.SearchFor, value); | ||
| 29 | } | ||
| 30 | } | ||
| 31 | } | ||
