Exemplo n.º 1
0
        public static XmlObject Load(string path, XmlDefinition def)
        {
            var doc = new XmlDocument();

            doc.Load(path);
            return(new XmlObject(doc.DocumentElement, null, def.SelectNode(doc.DocumentElement.Name)));
        }
Exemplo n.º 2
0
        internal DataManager()
        {
            _names =
                File.ReadAllLines(Path.Combine("Datasheet", "Names.txt"))
                    .Where(e => !string.IsNullOrWhiteSpace(e))
                    .Select(e => e.Trim())
                    .ToArray();

            _xmlDef = new XmlDefinition(Path.Combine("Datasheet", "DataDefine.def"));
            _world = XmlObject.Load(Path.Combine("Datasheet", "World.xml"), _xmlDef);
        }