Beispiel #1
0
        async Task AddStop(RouteStop stop, bool addToStorage)
        {
            Debug.Assert(stop.Route == this);

            if (addToStorage)
            {
                await AppStorage.Instance.AddRouteStop(stop);
            }

            if (Stops.Count > 0 && stop.Kind != RouteStopKind.EndPoint && HasEndPoint)
            {
                Stops.Insert(Stops.Count - 1, stop);
            }
            else
            {
                Stops.Add(stop);
            }

            Debug.AssertIsNull(CurrentLegs);
            UpdateLegs(true);

            //Debug.AssertNotNull(stop.Leg);
            //RequestLegDuration(stop.Leg);
        }