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