Avoid multiple comments in xml for array entries
This commit is contained in:
1 parent
c64d7c5bab
commit
cd4c010f99
2 files changed
+8
-1
No files matched your search
@@ -348,8 +348,14 @@ namespace Vocaluxe.Base
|
||||
};
|
||||
}
|
||||
|
||||
private static readonly List<string> _CommentsGot = new List<string>();
|
||||
|
||||
private static string _GetComment(string elName)
|
||||
{
|
||||
// Avoid multiple comments (e.g. for array entries)
|
||||
if (_CommentsGot.Contains(elName))
|
||||
return null;
|
||||
_CommentsGot.Add(elName);
|
||||
switch (elName)
|
||||
{
|
||||
case "DebugLevel":
|
||||
@@ -467,6 +473,7 @@ namespace Vocaluxe.Base
|
||||
|
||||
public static void SaveConfig()
|
||||
{
|
||||
_CommentsGot.Clear();
|
||||
var xml = new CXmlSerializer(true, _GetComment);
|
||||
xml.Serialize(_FileConfig, Config);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user