diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-11-01 10:56:09 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-11-01 10:56:09 -0700 |
| commit | 69b15d96cebdbb7201b1849b4f62786633d70b8d (patch) | |
| tree | 4b65de8679e4b4ab81b69edcccbac1ae9f55a16d /src/WixToolset.Data/Tuples/ComplusTuple.cs | |
| parent | a8656a87887d6cb2c54f4bbeacee37f7074f1032 (diff) | |
| download | wix-69b15d96cebdbb7201b1849b4f62786633d70b8d.tar.gz wix-69b15d96cebdbb7201b1849b4f62786633d70b8d.tar.bz2 wix-69b15d96cebdbb7201b1849b4f62786633d70b8d.zip | |
Introduce WiX Intermediate Representation
Diffstat (limited to 'src/WixToolset.Data/Tuples/ComplusTuple.cs')
| -rw-r--r-- | src/WixToolset.Data/Tuples/ComplusTuple.cs | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Tuples/ComplusTuple.cs b/src/WixToolset.Data/Tuples/ComplusTuple.cs new file mode 100644 index 00000000..0287c689 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ComplusTuple.cs | |||
| @@ -0,0 +1,52 @@ | |||
| 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 WixToolset.Data | ||
| 4 | { | ||
| 5 | using WixToolset.Data.Tuples; | ||
| 6 | |||
| 7 | public static partial class TupleDefinitions | ||
| 8 | { | ||
| 9 | public static readonly IntermediateTupleDefinition Complus = new IntermediateTupleDefinition( | ||
| 10 | TupleDefinitionType.Complus, | ||
| 11 | new[] | ||
| 12 | { | ||
| 13 | new IntermediateFieldDefinition(nameof(ComplusTupleFields.Component_), IntermediateFieldType.String), | ||
| 14 | new IntermediateFieldDefinition(nameof(ComplusTupleFields.ExpType), IntermediateFieldType.Number), | ||
| 15 | }, | ||
| 16 | typeof(ComplusTuple)); | ||
| 17 | } | ||
| 18 | } | ||
| 19 | |||
| 20 | namespace WixToolset.Data.Tuples | ||
| 21 | { | ||
| 22 | public enum ComplusTupleFields | ||
| 23 | { | ||
| 24 | Component_, | ||
| 25 | ExpType, | ||
| 26 | } | ||
| 27 | |||
| 28 | public class ComplusTuple : IntermediateTuple | ||
| 29 | { | ||
| 30 | public ComplusTuple() : base(TupleDefinitions.Complus, null, null) | ||
| 31 | { | ||
| 32 | } | ||
| 33 | |||
| 34 | public ComplusTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Complus, sourceLineNumber, id) | ||
| 35 | { | ||
| 36 | } | ||
| 37 | |||
| 38 | public IntermediateField this[ComplusTupleFields index] => this.Fields[(int)index]; | ||
| 39 | |||
| 40 | public string Component_ | ||
| 41 | { | ||
| 42 | get => (string)this.Fields[(int)ComplusTupleFields.Component_]?.Value; | ||
| 43 | set => this.Set((int)ComplusTupleFields.Component_, value); | ||
| 44 | } | ||
| 45 | |||
| 46 | public int ExpType | ||
| 47 | { | ||
| 48 | get => (int)this.Fields[(int)ComplusTupleFields.ExpType]?.Value; | ||
| 49 | set => this.Set((int)ComplusTupleFields.ExpType, value); | ||
| 50 | } | ||
| 51 | } | ||
| 52 | } \ No newline at end of file | ||
