/// <summary> /// Converts the flight plans in memory /// </summary> /// <param name="plg">the plg format loaded in memory</param> /// <returns>the fp format in memory</returns> /// <exception cref="ArgumentNullException">plg argument null</exception> /// <exception cref="FlightPlanConvertException">convertion fails, usually due to bad input data</exception> public XDocument Convert(XDocument plg) { if (plg == null) throw new ArgumentNullException("plg"); var plgParser = new PlgParser(); var flightPlan = plgParser.ParsePlg(plg); var fpExporter = new FpExporter(); var fp = fpExporter.CreateFp(flightPlan); return fp; }
/// <summary> /// Converts the flight plans in memory /// </summary> /// <param name="plg">the plg format loaded in memory</param> /// <returns>the fp format in memory</returns> /// <exception cref="ArgumentNullException">plg argument null</exception> /// <exception cref="FlightPlanConvertException">convertion fails, usually due to bad input data</exception> public XDocument Convert(XDocument plg) { if (plg == null) { throw new ArgumentNullException("plg"); } var plgParser = new PlgParser(); var flightPlan = plgParser.ParsePlg(plg); var fpExporter = new FpExporter(); var fp = fpExporter.CreateFp(flightPlan); return(fp); }