public Leg(LegDto leg) { DepartureTime = leg.DepartureTime; ArrivalTime = leg.ArrivalTime; Duration = TimeSpan.FromTicks(leg.Duration); SummaryHtml = leg.SummaryHtml; Stops = leg.ScheduledStopCalls?.Count ?? 0; Polyline = leg.Polyline; VehicleType = leg.VehicleType; }
protected bool Equals(LegDto other) { return(string.Equals(From, other.From) && string.Equals(To, other.To) && Distance == other.Distance && Cost == other.Cost && Type == other.Type); }