diff options
| author | Rob Mensching <rob@firegiant.com> | 2019-05-23 15:34:42 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2019-05-23 15:43:40 -0700 |
| commit | c22120fa0311033b06e2cbc78190fc9066e86e42 (patch) | |
| tree | b13fff76acedc2f111ca2e5e45bfe3a2f2edab34 /src/WixToolset.Data/Tuples/AssemblyTuple.cs | |
| parent | 0025fa31f46c98d37d6d204a1fb7f8ea9a12b620 (diff) | |
| download | wix-c22120fa0311033b06e2cbc78190fc9066e86e42.tar.gz wix-c22120fa0311033b06e2cbc78190fc9066e86e42.tar.bz2 wix-c22120fa0311033b06e2cbc78190fc9066e86e42.zip | |
Rename MsiAssemblyTuple to AssemblyTuple
Diffstat (limited to 'src/WixToolset.Data/Tuples/AssemblyTuple.cs')
| -rw-r--r-- | src/WixToolset.Data/Tuples/AssemblyTuple.cs | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Tuples/AssemblyTuple.cs b/src/WixToolset.Data/Tuples/AssemblyTuple.cs new file mode 100644 index 00000000..15367cc3 --- /dev/null +++ b/src/WixToolset.Data/Tuples/AssemblyTuple.cs | |||
| @@ -0,0 +1,96 @@ | |||
| 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 Assembly = new IntermediateTupleDefinition( | ||
| 10 | TupleDefinitionType.Assembly, | ||
| 11 | new[] | ||
| 12 | { | ||
| 13 | new IntermediateFieldDefinition(nameof(AssemblyTupleFields.ComponentRef), IntermediateFieldType.String), | ||
| 14 | new IntermediateFieldDefinition(nameof(AssemblyTupleFields.FeatureRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(AssemblyTupleFields.ManifestFileRef), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(AssemblyTupleFields.ApplicationFileRef), IntermediateFieldType.String), | ||
| 17 | new IntermediateFieldDefinition(nameof(AssemblyTupleFields.Attributes), IntermediateFieldType.Number), | ||
| 18 | new IntermediateFieldDefinition(nameof(AssemblyTupleFields.ProcessorArchitecture), IntermediateFieldType.String), | ||
| 19 | }, | ||
| 20 | typeof(AssemblyTuple)); | ||
| 21 | } | ||
| 22 | } | ||
| 23 | |||
| 24 | namespace WixToolset.Data.Tuples | ||
| 25 | { | ||
| 26 | public enum AssemblyTupleFields | ||
| 27 | { | ||
| 28 | ComponentRef, | ||
| 29 | FeatureRef, | ||
| 30 | ManifestFileRef, | ||
| 31 | ApplicationFileRef, | ||
| 32 | Attributes, | ||
| 33 | ProcessorArchitecture, | ||
| 34 | } | ||
| 35 | |||
| 36 | public enum AssemblyType | ||
| 37 | { | ||
| 38 | /// <summary>File is not an assembly.</summary> | ||
| 39 | NotAnAssembly, | ||
| 40 | |||
| 41 | /// <summary>File is a Common Language Runtime Assembly.</summary> | ||
| 42 | DotNetAssembly, | ||
| 43 | |||
| 44 | /// <summary>File is Win32 SxS assembly.</summary> | ||
| 45 | Win32Assembly, | ||
| 46 | } | ||
| 47 | |||
| 48 | public class AssemblyTuple : IntermediateTuple | ||
| 49 | { | ||
| 50 | public AssemblyTuple() : base(TupleDefinitions.Assembly, null, null) | ||
| 51 | { | ||
| 52 | } | ||
| 53 | |||
| 54 | public AssemblyTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Assembly, sourceLineNumber, id) | ||
| 55 | { | ||
| 56 | } | ||
| 57 | |||
| 58 | public IntermediateField this[AssemblyTupleFields index] => this.Fields[(int)index]; | ||
| 59 | |||
| 60 | public string ComponentRef | ||
| 61 | { | ||
| 62 | get => (string)this.Fields[(int)AssemblyTupleFields.ComponentRef]; | ||
| 63 | set => this.Set((int)AssemblyTupleFields.ComponentRef, value); | ||
| 64 | } | ||
| 65 | |||
| 66 | public string FeatureRef | ||
| 67 | { | ||
| 68 | get => (string)this.Fields[(int)AssemblyTupleFields.FeatureRef]; | ||
| 69 | set => this.Set((int)AssemblyTupleFields.FeatureRef, value); | ||
| 70 | } | ||
| 71 | |||
| 72 | public string ManifestFileRef | ||
| 73 | { | ||
| 74 | get => (string)this.Fields[(int)AssemblyTupleFields.ManifestFileRef]; | ||
| 75 | set => this.Set((int)AssemblyTupleFields.ManifestFileRef, value); | ||
| 76 | } | ||
| 77 | |||
| 78 | public string ApplicationFileRef | ||
| 79 | { | ||
| 80 | get => (string)this.Fields[(int)AssemblyTupleFields.ApplicationFileRef]; | ||
| 81 | set => this.Set((int)AssemblyTupleFields.ApplicationFileRef, value); | ||
| 82 | } | ||
| 83 | |||
| 84 | public AssemblyType Type | ||
| 85 | { | ||
| 86 | get => (AssemblyType)this.Fields[(int)AssemblyTupleFields.Attributes].AsNumber(); | ||
| 87 | set => this.Set((int)AssemblyTupleFields.Attributes, (int)value); | ||
| 88 | } | ||
| 89 | |||
| 90 | public string ProcessorArchitecture | ||
| 91 | { | ||
| 92 | get => (string)this.Fields[(int)AssemblyTupleFields.ProcessorArchitecture]; | ||
| 93 | set => this.Set((int)AssemblyTupleFields.ProcessorArchitecture, value); | ||
| 94 | } | ||
| 95 | } | ||
| 96 | } | ||
