/// <summary> /// Load an aircraft data from specified Xml file. /// </summary> /// <exception cref="Exception"></exception> public PerfTable ReadFromXml(string filePath) { var doc = XDocument.Load(filePath); if (!IsBoeingFormat(doc)) { throw new Exception(); } return(new PerfTable(LoadTable(filePath), TOTableLoader.GetEntry(filePath, doc))); }
/// <summary> /// Load an aircraft data from specified Xml file. /// </summary> /// /// <exception cref="Exception"></exception> public static PerfTable ReadFromXml(string filePath) { var doc = XDocument.Load(filePath); var(success, table) = LoadPerfTable(doc.Root); if (!success) { throw new Exception($"Failed to load {filePath} as AirbusPerfTable."); } return(new PerfTable(table, TOTableLoader.GetEntry(filePath, doc))); }