diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-12-01 01:09:42 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-12-01 01:09:42 -0800 |
| commit | 720c4a0db1a2fb2aa3e08e5c99d5198873e448ba (patch) | |
| tree | 6794b760149c2f9ff0e01fadc9f2faae5f2c6553 /src/test/Example.Extension/ExampleTuple.cs | |
| parent | 5ee1645db44908f67eee90da9cd0197c60711eae (diff) | |
| download | wix-720c4a0db1a2fb2aa3e08e5c99d5198873e448ba.tar.gz wix-720c4a0db1a2fb2aa3e08e5c99d5198873e448ba.tar.bz2 wix-720c4a0db1a2fb2aa3e08e5c99d5198873e448ba.zip | |
Introduce ExampleExtension for testing
Diffstat (limited to 'src/test/Example.Extension/ExampleTuple.cs')
| -rw-r--r-- | src/test/Example.Extension/ExampleTuple.cs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/test/Example.Extension/ExampleTuple.cs b/src/test/Example.Extension/ExampleTuple.cs new file mode 100644 index 00000000..f280a5c8 --- /dev/null +++ b/src/test/Example.Extension/ExampleTuple.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 ExampleTupleFields | ||
| 8 | { | ||
| 9 | Example, | ||
| 10 | Value, | ||
| 11 | } | ||
| 12 | |||
| 13 | public class ExampleTuple : IntermediateTuple | ||
| 14 | { | ||
| 15 | public ExampleTuple() : base(TupleDefinitions.Example, null, null) | ||
| 16 | { | ||
| 17 | } | ||
| 18 | |||
| 19 | public ExampleTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Example, sourceLineNumber, id) | ||
| 20 | { | ||
| 21 | } | ||
| 22 | |||
| 23 | public IntermediateField this[ExampleTupleFields index] => this.Fields[(int)index]; | ||
| 24 | |||
| 25 | public string Value | ||
| 26 | { | ||
| 27 | get => this.Fields[(int)ExampleTupleFields.Value]?.AsString(); | ||
| 28 | set => this.Set((int)ExampleTupleFields.Value, value); | ||
| 29 | } | ||
| 30 | } | ||
| 31 | } | ||
