public void Setup() { DecodedMetarsNotStrict = TestMetarSource.Select(metar => MetarDecoder.ParseWithMode(metar, false) ).ToList(); DecodedMetarsStrict = TestMetarSource.Select(metar => MetarDecoder.ParseWithMode(metar, true) ).ToList(); }
static void Main(string[] args) { var MetarDecoder = new MetarDecoder(); MetarDecoder.SetStrictParsing(true); var options = new Options(); if (Parser.Default.ParseArguments(args, options)) { var decodedMetar = MetarDecoder.ParseWithMode(options.Metar); Display(decodedMetar); } }
public void Setup() { DecodedMetars = TestMetarSource.Select(metar => MetarDecoder.ParseWithMode(metar)).ToList(); }
/// <summary> /// Retrieves a beautified string output of a METAR message /// </summary> /// <param name="rawMetar">The raw METAR.</param> /// <param name="strictMode">METAR strict decoding mode</param> /// <returns></returns> public static string GetWeatherMessage(string rawMetar, OutputType outputType = OutputType.Text, bool strictMode = true, bool showRawMetar = false, string htmlClass = "") { var decodedMetar = MetarDecoder.ParseWithMode(rawMetar, strictMode); return(decodedMetar.GetWeatherMessage(outputType, showRawMetar, htmlClass)); }