diff options
| author | Rob Mensching <rob@firegiant.com> | 2021-04-02 14:28:56 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2021-04-02 14:46:29 -0700 |
| commit | 4bb99d4a7521f3182b3d8ea9833038dc067db118 (patch) | |
| tree | 031c917bfc0fd3c513579646e92c3e9f823efba3 /src/WixToolset.Data/Symbols/WixModuleSymbol.cs | |
| parent | a0dd2bc561ee6aa6b7aebedcff76c8a11e14bc9f (diff) | |
| download | wix-4bb99d4a7521f3182b3d8ea9833038dc067db118.tar.gz wix-4bb99d4a7521f3182b3d8ea9833038dc067db118.tar.bz2 wix-4bb99d4a7521f3182b3d8ea9833038dc067db118.zip | |
Move codepage from section and to package, module, patch symbols
Contributes to wixtoolset/issues#5801
Diffstat (limited to 'src/WixToolset.Data/Symbols/WixModuleSymbol.cs')
| -rw-r--r-- | src/WixToolset.Data/Symbols/WixModuleSymbol.cs | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Symbols/WixModuleSymbol.cs b/src/WixToolset.Data/Symbols/WixModuleSymbol.cs new file mode 100644 index 00000000..fbb16764 --- /dev/null +++ b/src/WixToolset.Data/Symbols/WixModuleSymbol.cs | |||
| @@ -0,0 +1,68 @@ | |||
| 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.Symbols; | ||
| 6 | |||
| 7 | public static partial class SymbolDefinitions | ||
| 8 | { | ||
| 9 | public static readonly IntermediateSymbolDefinition WixModule = new IntermediateSymbolDefinition( | ||
| 10 | SymbolDefinitionType.WixModule, | ||
| 11 | new[] | ||
| 12 | { | ||
| 13 | new IntermediateFieldDefinition(nameof(WixModuleSymbolFields.ModuleId), IntermediateFieldType.String), | ||
| 14 | new IntermediateFieldDefinition(nameof(WixModuleSymbolFields.Language), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(WixModuleSymbolFields.Version), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(WixModuleSymbolFields.Codepage), IntermediateFieldType.String), | ||
| 17 | }, | ||
| 18 | typeof(WixModuleSymbol)); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | namespace WixToolset.Data.Symbols | ||
| 23 | { | ||
| 24 | public enum WixModuleSymbolFields | ||
| 25 | { | ||
| 26 | ModuleId, | ||
| 27 | Language, | ||
| 28 | Version, | ||
| 29 | Codepage, | ||
| 30 | } | ||
| 31 | |||
| 32 | public class WixModuleSymbol : IntermediateSymbol | ||
| 33 | { | ||
| 34 | public WixModuleSymbol() : base(SymbolDefinitions.WixModule, null, null) | ||
| 35 | { | ||
| 36 | } | ||
| 37 | |||
| 38 | public WixModuleSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixModule, sourceLineNumber, id) | ||
| 39 | { | ||
| 40 | } | ||
| 41 | |||
| 42 | public IntermediateField this[WixModuleSymbolFields index] => this.Fields[(int)index]; | ||
| 43 | |||
| 44 | public string ModuleId | ||
| 45 | { | ||
| 46 | get => (string)this.Fields[(int)WixModuleSymbolFields.ModuleId]; | ||
| 47 | set => this.Set((int)WixModuleSymbolFields.ModuleId, value); | ||
| 48 | } | ||
| 49 | |||
| 50 | public string Language | ||
| 51 | { | ||
| 52 | get => (string)this.Fields[(int)WixModuleSymbolFields.Language]; | ||
| 53 | set => this.Set((int)WixModuleSymbolFields.Language, value); | ||
| 54 | } | ||
| 55 | |||
| 56 | public string Version | ||
| 57 | { | ||
| 58 | get => (string)this.Fields[(int)WixModuleSymbolFields.Version]; | ||
| 59 | set => this.Set((int)WixModuleSymbolFields.Version, value); | ||
| 60 | } | ||
| 61 | |||
| 62 | public string Codepage | ||
| 63 | { | ||
| 64 | get => (string)this.Fields[(int)WixModuleSymbolFields.Codepage]; | ||
| 65 | set => this.Set((int)WixModuleSymbolFields.Codepage, value); | ||
| 66 | } | ||
| 67 | } | ||
| 68 | } | ||
