From ca5fb0bdfcad5c239c2070e465728abe460d804d Mon Sep 17 00:00:00 2001 From: Miepee <38186597+Miepee@users.noreply.github.com> Date: Mon, 23 May 2022 21:33:02 +0200 Subject: [PATCH] fix doc errors in launcher config xml --- .../AM2RLauncher/XML/LauncherConfigXML.cs | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/AM2RLauncher/AM2RLauncher/XML/LauncherConfigXML.cs b/AM2RLauncher/AM2RLauncher/XML/LauncherConfigXML.cs index c89d5be..9b8efbe 100644 --- a/AM2RLauncher/AM2RLauncher/XML/LauncherConfigXML.cs +++ b/AM2RLauncher/AM2RLauncher/XML/LauncherConfigXML.cs @@ -23,6 +23,7 @@ public class LauncherConfigXML [XmlAttribute("Language")] public string Language { get; set; } + //TODO: use of "HQ" capitalization should be consistent within project! /// Indicates whether or not to use High-quality music when patching to PC. Used for [XmlAttribute("MusicHQPC")] public bool MusicHQPC @@ -75,22 +76,22 @@ public class LauncherConfigXML // Set is basically the same, but instead of returning it, we set the property value, which would be followed after the `='. // So LauncherConfigXML[property] = hellWorld would set the value of `property` to `hellWorld` /// - /// An Indexer for . Not to be used directly, use - /// or instead! + /// An Indexer for . Not to be used directly, use + /// or instead! /// /// The property to get or set. /// The value of as an if used as a get, if used as a set. public object this[string property] { - get - { - // This is gonna throw an exception, if the property can't be found. because of null.GetValue(this) - return typeof(LauncherConfigXML).GetProperties().First(p => p.CanRead && p.Name == property).GetValue(this).ToString(); - } - set - { - typeof(LauncherConfigXML).GetProperties().First(p => p.CanWrite && p.Name == property).SetValue(this, value); - } + get + { + // This is gonna throw an exception, if the property can't be found. because of null.GetValue(this) + return typeof(LauncherConfigXML).GetProperties().First(p => p.CanRead && p.Name == property).GetValue(this).ToString(); + } + set + { + typeof(LauncherConfigXML).GetProperties().First(p => p.CanWrite && p.Name == property).SetValue(this, value); + } } ///