Example #1
0
        public override string ToString()
        {
            var builder = new StringBuilder();

            builder.AppendFormat("\nsegment: [{0}]\n", Segment != null ? Segment.ToString() : string.Empty);
            builder.Append("efforts: [");

            if (Efforts != null)
            {
                Efforts.Each(effort => builder.AppendFormat("effort: [{0}]", effort));
            }

            builder.Append("]\n");

            return(builder.ToString());
        }
Example #2
0
            public RideEffortsV2 ToRideEfforts()
            {
                var rideEffort = new RideEffortsV2
                {
                    RideId  = ConvertWrapper.ToInt32(Id),
                    Version = Version,
                    Efforts = new List <EffortSegmentV2>()
                };

                if (Efforts != null)
                {
                    Efforts.Each(effort => rideEffort.Efforts.Add(effort.ToEffortSegment()));
                }

                return(rideEffort);
            }
Example #3
0
        public override string ToString()
        {
            var builder = new StringBuilder();

            builder.AppendFormat("\nRideId: {0}\n", RideId);
            builder.Append("EffortSegments: [");
            if (Efforts != null)
            {
                Efforts.Each((coord, index) =>
                {
                    builder.Append(coord);
                    if (index < (Efforts.Count - 1))
                    {
                        builder.Append(", ");
                    }
                });
            }
            builder.Append("]\n");
            builder.AppendFormat("Version: {0}\n", Version ?? string.Empty);

            return(builder.ToString());
        }