Пример #1
0
        public override Uri ToUri()
        {
            var qsb = new QueryStringBuilder()
                      .Append("locations", RequestUtils.GetLatLngCollectionStr(_locations))
                      .Append("path", RequestUtils.GetLatLngCollectionStr(_path))
                      .Append("samples", Samples.GetValueOrDefault() > 0 ? Samples.ToString() : "");

            var url = "json?" + qsb;

            return(new Uri(url, UriKind.Relative));
        }
Пример #2
0
        internal Uri ToUri()
        {
            this.EnsureSensor(true);

            var qsb = new Internal.QueryStringBuilder()

                      .Append("locations", RequestUtils.GetLatLngCollectionStr(this._locations))
                      .Append("path", RequestUtils.GetLatLngCollectionStr(this._path))
                      .Append("samples", (Samples.GetValueOrDefault() > 0 ? Samples.ToString() : ""))
                      .Append("sensor", (Sensor.Value ? "true" : "false"));

            var url = "json?" + qsb.ToString();

            return(new Uri(url, UriKind.Relative));
        }