Example #1
0
 /// <summary>
 /// Create an instance of a Gpx Analyser
 /// </summary>
 /// <param name="Url">Url of gpx File</param>
 /// <param name="options">options of Analyser</param>
 public GpxAnalyser(string url, GpxAnalyserOptions options = null) : this(options)
 {
     Stream stream = null;
     if (IsLocalPath(url))
     {
         stream = new FileStream(url, FileMode.Open);
     }
     else
     {
         using (var client = new HttpClient())
         {
             var get = client.GetStreamAsync(url);
             get.Wait();
             stream = get.Result;
         }
     }
     gpxReader = new GpxReader(stream);
 }
Example #2
0
 /// <summary>
 /// Create an instance of a Gpx Analyser
 /// </summary>
 /// <param name="gpxReader">Gpx Reader cannot be null</param>
 /// <param name="options">options of Analyser</param>
 public GpxAnalyser(GpxReader gpxReader, GpxAnalyserOptions options = null) : this(options)
 {
     this.gpxReader = gpxReader ?? throw new ArgumentNullException(nameof(gpxReader));
 }
Example #3
0
 /// <summary>
 /// Create an instance of a Gpx Analyser
 /// </summary>
 /// <param name="gpxReader">Gpx Reader cannot be null</param>
 public GpxAnalyser(GpxReader gpxReader) : this()
 {
     this.gpxReader = gpxReader ?? throw new ArgumentNullException(nameof(gpxReader));
 }