diff options
Diffstat (limited to 'src/WixToolset.Core/LocalizationParser.cs')
-rw-r--r-- | src/WixToolset.Core/LocalizationParser.cs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/WixToolset.Core/LocalizationParser.cs b/src/WixToolset.Core/LocalizationParser.cs index a0cf38a9..aaf4c425 100644 --- a/src/WixToolset.Core/LocalizationParser.cs +++ b/src/WixToolset.Core/LocalizationParser.cs | |||
@@ -30,10 +30,10 @@ namespace WixToolset.Core | |||
30 | 30 | ||
31 | public Localization ParseLocalization(XDocument document) | 31 | public Localization ParseLocalization(XDocument document) |
32 | { | 32 | { |
33 | XElement root = document.Root; | 33 | var root = document.Root; |
34 | Localization localization = null; | 34 | Localization localization = null; |
35 | 35 | ||
36 | SourceLineNumber sourceLineNumbers = SourceLineNumber.CreateFromXObject(root); | 36 | var sourceLineNumbers = SourceLineNumber.CreateFromXObject(root); |
37 | if (LocalizationParser.XmlElementName == root.Name.LocalName) | 37 | if (LocalizationParser.XmlElementName == root.Name.LocalName) |
38 | { | 38 | { |
39 | if (LocalizationParser.WxlNamespace == root.Name.Namespace) | 39 | if (LocalizationParser.WxlNamespace == root.Name.Namespace) |
@@ -85,11 +85,11 @@ namespace WixToolset.Core | |||
85 | /// <param name="node">Element to parse.</param> | 85 | /// <param name="node">Element to parse.</param> |
86 | private static Localization ParseWixLocalizationElement(IMessaging messaging, XElement node) | 86 | private static Localization ParseWixLocalizationElement(IMessaging messaging, XElement node) |
87 | { | 87 | { |
88 | int codepage = -1; | 88 | var sourceLineNumbers = SourceLineNumber.CreateFromXObject(node); |
89 | var codepage = -1; | ||
89 | string culture = null; | 90 | string culture = null; |
90 | SourceLineNumber sourceLineNumbers = SourceLineNumber.CreateFromXObject(node); | ||
91 | 91 | ||
92 | foreach (XAttribute attrib in node.Attributes()) | 92 | foreach (var attrib in node.Attributes()) |
93 | { | 93 | { |
94 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || LocalizationParser.WxlNamespace == attrib.Name.Namespace) | 94 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || LocalizationParser.WxlNamespace == attrib.Name.Namespace) |
95 | { | 95 | { |
@@ -115,10 +115,10 @@ namespace WixToolset.Core | |||
115 | } | 115 | } |
116 | } | 116 | } |
117 | 117 | ||
118 | Dictionary<string, BindVariable> variables = new Dictionary<string, BindVariable>(); | 118 | var variables = new Dictionary<string, BindVariable>(); |
119 | Dictionary<string, LocalizedControl> localizedControls = new Dictionary<string, LocalizedControl>(); | 119 | var localizedControls = new Dictionary<string, LocalizedControl>(); |
120 | 120 | ||
121 | foreach (XElement child in node.Elements()) | 121 | foreach (var child in node.Elements()) |
122 | { | 122 | { |
123 | if (LocalizationParser.WxlNamespace == child.Name.Namespace) | 123 | if (LocalizationParser.WxlNamespace == child.Name.Namespace) |
124 | { | 124 | { |
@@ -155,10 +155,10 @@ namespace WixToolset.Core | |||
155 | private static void ParseString(IMessaging messaging, XElement node, IDictionary<string, BindVariable> variables) | 155 | private static void ParseString(IMessaging messaging, XElement node, IDictionary<string, BindVariable> variables) |
156 | { | 156 | { |
157 | string id = null; | 157 | string id = null; |
158 | bool overridable = false; | 158 | var overridable = false; |
159 | SourceLineNumber sourceLineNumbers = SourceLineNumber.CreateFromXObject(node); | 159 | var sourceLineNumbers = SourceLineNumber.CreateFromXObject(node); |
160 | 160 | ||
161 | foreach (XAttribute attrib in node.Attributes()) | 161 | foreach (var attrib in node.Attributes()) |
162 | { | 162 | { |
163 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || LocalizationParser.WxlNamespace == attrib.Name.Namespace) | 163 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || LocalizationParser.WxlNamespace == attrib.Name.Namespace) |
164 | { | 164 | { |
@@ -184,7 +184,7 @@ namespace WixToolset.Core | |||
184 | } | 184 | } |
185 | } | 185 | } |
186 | 186 | ||
187 | string value = Common.GetInnerText(node); | 187 | var value = Common.GetInnerText(node); |
188 | 188 | ||
189 | if (null == id) | 189 | if (null == id) |
190 | { | 190 | { |
@@ -228,7 +228,7 @@ namespace WixToolset.Core | |||
228 | var rightAligned = false; | 228 | var rightAligned = false; |
229 | var leftScroll = false; | 229 | var leftScroll = false; |
230 | 230 | ||
231 | foreach (XAttribute attrib in node.Attributes()) | 231 | foreach (var attrib in node.Attributes()) |
232 | { | 232 | { |
233 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || LocalizationParser.WxlNamespace == attrib.Name.Namespace) | 233 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || LocalizationParser.WxlNamespace == attrib.Name.Namespace) |
234 | { | 234 | { |