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); }
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); }
public static Task Parse(System.Xml.Linq.XElement element) { return(Unknown.ParseXml(element, _Factory) as Task); }