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/TypeLibTuple.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/TypeLibTuple.cs')
| -rw-r--r-- | src/WixToolset.Data/Tuples/TypeLibTuple.cs | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Tuples/TypeLibTuple.cs b/src/WixToolset.Data/Tuples/TypeLibTuple.cs new file mode 100644 index 00000000..7bd26bf3 --- /dev/null +++ b/src/WixToolset.Data/Tuples/TypeLibTuple.cs | |||
| @@ -0,0 +1,100 @@ | |||
| 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 TypeLib = new IntermediateTupleDefinition( | ||
| 10 | TupleDefinitionType.TypeLib, | ||
| 11 | new[] | ||
| 12 | { | ||
| 13 | new IntermediateFieldDefinition(nameof(TypeLibTupleFields.LibID), IntermediateFieldType.String), | ||
| 14 | new IntermediateFieldDefinition(nameof(TypeLibTupleFields.Language), IntermediateFieldType.Number), | ||
| 15 | new IntermediateFieldDefinition(nameof(TypeLibTupleFields.Component_), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(TypeLibTupleFields.Version), IntermediateFieldType.Number), | ||
| 17 | new IntermediateFieldDefinition(nameof(TypeLibTupleFields.Description), IntermediateFieldType.String), | ||
| 18 | new IntermediateFieldDefinition(nameof(TypeLibTupleFields.Directory_), IntermediateFieldType.String), | ||
| 19 | new IntermediateFieldDefinition(nameof(TypeLibTupleFields.Feature_), IntermediateFieldType.String), | ||
| 20 | new IntermediateFieldDefinition(nameof(TypeLibTupleFields.Cost), IntermediateFieldType.Number), | ||
| 21 | }, | ||
| 22 | typeof(TypeLibTuple)); | ||
| 23 | } | ||
| 24 | } | ||
| 25 | |||
| 26 | namespace WixToolset.Data.Tuples | ||
| 27 | { | ||
| 28 | public enum TypeLibTupleFields | ||
| 29 | { | ||
| 30 | LibID, | ||
| 31 | Language, | ||
| 32 | Component_, | ||
| 33 | Version, | ||
| 34 | Description, | ||
| 35 | Directory_, | ||
| 36 | Feature_, | ||
| 37 | Cost, | ||
| 38 | } | ||
| 39 | |||
| 40 | public class TypeLibTuple : IntermediateTuple | ||
| 41 | { | ||
| 42 | public TypeLibTuple() : base(TupleDefinitions.TypeLib, null, null) | ||
| 43 | { | ||
| 44 | } | ||
| 45 | |||
| 46 | public TypeLibTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.TypeLib, sourceLineNumber, id) | ||
| 47 | { | ||
| 48 | } | ||
| 49 | |||
| 50 | public IntermediateField this[TypeLibTupleFields index] => this.Fields[(int)index]; | ||
| 51 | |||
| 52 | public string LibID | ||
| 53 | { | ||
| 54 | get => (string)this.Fields[(int)TypeLibTupleFields.LibID]?.Value; | ||
| 55 | set => this.Set((int)TypeLibTupleFields.LibID, value); | ||
| 56 | } | ||
| 57 | |||
| 58 | public int Language | ||
| 59 | { | ||
| 60 | get => (int)this.Fields[(int)TypeLibTupleFields.Language]?.Value; | ||
| 61 | set => this.Set((int)TypeLibTupleFields.Language, value); | ||
| 62 | } | ||
| 63 | |||
| 64 | public string Component_ | ||
| 65 | { | ||
| 66 | get => (string)this.Fields[(int)TypeLibTupleFields.Component_]?.Value; | ||
| 67 | set => this.Set((int)TypeLibTupleFields.Component_, value); | ||
| 68 | } | ||
| 69 | |||
| 70 | public int Version | ||
| 71 | { | ||
| 72 | get => (int)this.Fields[(int)TypeLibTupleFields.Version]?.Value; | ||
| 73 | set => this.Set((int)TypeLibTupleFields.Version, value); | ||
| 74 | } | ||
| 75 | |||
| 76 | public string Description | ||
| 77 | { | ||
| 78 | get => (string)this.Fields[(int)TypeLibTupleFields.Description]?.Value; | ||
| 79 | set => this.Set((int)TypeLibTupleFields.Description, value); | ||
| 80 | } | ||
| 81 | |||
| 82 | public string Directory_ | ||
| 83 | { | ||
| 84 | get => (string)this.Fields[(int)TypeLibTupleFields.Directory_]?.Value; | ||
| 85 | set => this.Set((int)TypeLibTupleFields.Directory_, value); | ||
| 86 | } | ||
| 87 | |||
| 88 | public string Feature_ | ||
| 89 | { | ||
| 90 | get => (string)this.Fields[(int)TypeLibTupleFields.Feature_]?.Value; | ||
| 91 | set => this.Set((int)TypeLibTupleFields.Feature_, value); | ||
| 92 | } | ||
| 93 | |||
| 94 | public int Cost | ||
| 95 | { | ||
| 96 | get => (int)this.Fields[(int)TypeLibTupleFields.Cost]?.Value; | ||
| 97 | set => this.Set((int)TypeLibTupleFields.Cost, value); | ||
| 98 | } | ||
| 99 | } | ||
| 100 | } \ No newline at end of file | ||
