Google.Maps.DistanceMatrix.DistanceMatrixRequest.WaypointsToUri C# (CSharp) Method

WaypointsToUri() private method

private WaypointsToUri ( Location>.SortedList waypointsList ) : string
waypointsList Location>.SortedList
return string
        internal string WaypointsToUri(SortedList<int, Location> waypointsList)
        {
            if(waypointsList == null) return string.Empty;
            if(waypointsList.Count == 0) return string.Empty;

            StringBuilder sb = new StringBuilder();

            foreach(Location waypoint in waypointsList.Values)
            {
                if(sb.Length > 0) sb.Append("|");
                sb.Append(waypoint.ToString());
            }

            return sb.ToString();
        }