HelpData в tree.xml хранится в отсортированном виде

This commit is contained in:
Alexander Zakharenko 2017-05-15 19:32:19 +03:00
parent d1693556c5
commit 5ba9bd8dac
7 changed files with 1374 additions and 1366 deletions

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -8,7 +8,7 @@ using System.Xml.Serialization;
namespace NodesGenerator.XmlModel
{
[Serializable]
public class HelpUnit
public class HelpUnit : IComparable<HelpUnit>
{
public HelpUnit() { }
@ -23,6 +23,13 @@ namespace NodesGenerator.XmlModel
[XmlAttribute]
public string Value;
public int CompareTo(HelpUnit other)
{
if (ReferenceEquals(this, other)) return 0;
if (ReferenceEquals(null, other)) return 1;
return string.Compare(Key, other.Key, StringComparison.Ordinal);
}
}
[Serializable]
@ -42,6 +49,7 @@ namespace NodesGenerator.XmlModel
helpElementKey as string,
(storage.HelpData[helpElementKey] as NodeGenerator.HelpContext).help_context));
}
HelpData.Sort();
}
public NodeGenerator.HelpStorage ToHelpStorage()