aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/IntermediateSection.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-04-02 14:28:56 -0700
committerRob Mensching <rob@firegiant.com>2021-04-02 14:46:29 -0700
commit4bb99d4a7521f3182b3d8ea9833038dc067db118 (patch)
tree031c917bfc0fd3c513579646e92c3e9f823efba3 /src/WixToolset.Data/IntermediateSection.cs
parenta0dd2bc561ee6aa6b7aebedcff76c8a11e14bc9f (diff)
downloadwix-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/IntermediateSection.cs')
-rw-r--r--src/WixToolset.Data/IntermediateSection.cs16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/WixToolset.Data/IntermediateSection.cs b/src/WixToolset.Data/IntermediateSection.cs
index 86aa0c89..b9157875 100644
--- a/src/WixToolset.Data/IntermediateSection.cs
+++ b/src/WixToolset.Data/IntermediateSection.cs
@@ -18,13 +18,11 @@ namespace WixToolset.Data
18 /// </summary> 18 /// </summary>
19 /// <param name="id">Identifier for section.</param> 19 /// <param name="id">Identifier for section.</param>
20 /// <param name="type">Type of section.</param> 20 /// <param name="type">Type of section.</param>
21 /// <param name="codepage">Codepage for resulting database.</param>
22 /// <param name="compilationId">Optional compilation identifier</param> 21 /// <param name="compilationId">Optional compilation identifier</param>
23 public IntermediateSection(string id, SectionType type, int codepage, string compilationId = null) 22 public IntermediateSection(string id, SectionType type, string compilationId = null)
24 { 23 {
25 this.Id = id; 24 this.Id = id;
26 this.Type = type; 25 this.Type = type;
27 this.Codepage = codepage;
28 this.CompilationId = compilationId; 26 this.CompilationId = compilationId;
29 this.symbols = new List<IntermediateSymbol>(); 27 this.symbols = new List<IntermediateSymbol>();
30 } 28 }
@@ -42,12 +40,6 @@ namespace WixToolset.Data
42 public SectionType Type { get; } 40 public SectionType Type { get; }
43 41
44 /// <summary> 42 /// <summary>
45 /// Gets the codepage for the section.
46 /// </summary>
47 /// <value>Codepage for the section.</value>
48 public int Codepage { get; }
49
50 /// <summary>
51 /// Gets and sets the identifier of the compilation of the source file containing the section. 43 /// Gets and sets the identifier of the compilation of the source file containing the section.
52 /// </summary> 44 /// </summary>
53 public string CompilationId { get; } 45 public string CompilationId { get; }
@@ -98,7 +90,6 @@ namespace WixToolset.Data
98 /// </summary> 90 /// </summary>
99 internal static IntermediateSection Deserialize(ISymbolDefinitionCreator creator, Uri baseUri, JsonObject jsonObject) 91 internal static IntermediateSection Deserialize(ISymbolDefinitionCreator creator, Uri baseUri, JsonObject jsonObject)
100 { 92 {
101 var codepage = jsonObject.GetValueOrDefault("codepage", 0);
102 var id = jsonObject.GetValueOrDefault<string>("id"); 93 var id = jsonObject.GetValueOrDefault<string>("id");
103 var type = jsonObject.GetEnumOrDefault("type", SectionType.Unknown); 94 var type = jsonObject.GetEnumOrDefault("type", SectionType.Unknown);
104 95
@@ -107,7 +98,7 @@ namespace WixToolset.Data
107 throw new ArgumentException("JSON object is not a valid section, unknown section type", nameof(type)); 98 throw new ArgumentException("JSON object is not a valid section, unknown section type", nameof(type));
108 } 99 }
109 100
110 var section = new IntermediateSection(id, type, codepage); 101 var section = new IntermediateSection(id, type);
111 102
112 var symbolsJson = jsonObject.GetValueOrDefault<JsonArray>("symbols"); 103 var symbolsJson = jsonObject.GetValueOrDefault<JsonArray>("symbols");
113 104
@@ -124,8 +115,7 @@ namespace WixToolset.Data
124 { 115 {
125 var jsonObject = new JsonObject 116 var jsonObject = new JsonObject
126 { 117 {
127 { "type", this.Type.ToString().ToLowerInvariant() }, 118 { "type", this.Type.ToString().ToLowerInvariant() }
128 { "codepage", this.Codepage }
129 }; 119 };
130 120
131 if (!String.IsNullOrEmpty(this.Id)) 121 if (!String.IsNullOrEmpty(this.Id))