Пример #1
0
        private static Project _ParseProject(System.Xml.Linq.XElement root)
        {
            var ver = root.Attribute("Version").Value;

            if (!Version.TryParse(ver, out Version docVer))
            {
                throw new System.IO.FileLoadException();
            }
            if (docVer > CurrentVersion)
            {
                throw new System.IO.FileLoadException("Document Version " + docVer + " not supported");
            }

            return(Unknown.ParseXml(root, _Factory) as Project);
        }
Пример #2
0
        private static Config _ParseConfig(XElement root)
        {
            var ver = root.Attribute("Version").Value;

            if (!Version.TryParse(ver, out Version docVer))
            {
                throw new System.IO.FileLoadException();
            }
            if (docVer > CurrentVersion)
            {
                throw new System.IO.FileLoadException("Config Version " + docVer + " not supported");
            }

            return(Unknown.ParseXml(root, _Factory) as Config);
        }
Пример #3
0
 public static Task Parse(System.Xml.Linq.XElement element)
 {
     return(Unknown.ParseXml(element, _Factory) as Task);
 }