Пример #1
0
        public virtual object Clone()
        {
            Zone z = new Zone();

            z.ZoneColor         = ZoneColor;
            z.EndCoordinate     = EndCoordinate.Clone() as AxisCoordinate;
            z.StartCoordinate   = StartCoordinate.Clone() as AxisCoordinate;
            z.OppositeAxisTitle = OppositeAxisTitle;

            return(z);
        }
Пример #2
0
        public override string ToString()
        {
            var builder = new StringBuilder();

            builder.AppendFormat("\nid: {0}\n", Id);
            builder.AppendFormat("name: {0}\n", Name ?? string.Empty);
            builder.AppendFormat("climbCategory: {0}\n", ClimbCategory);
            builder.AppendFormat("averageGrade: {0}\n", AverageGrade);
            builder.AppendFormat("StartCoordinate: {0}\n", StartCoordinate != null ? StartCoordinate.ToString() : string.Empty);
            builder.AppendFormat("EndCoordinate: {0}\n", EndCoordinate != null ? EndCoordinate.ToString() : string.Empty);
            builder.AppendFormat("ElevationDifference: {0}\n", ElevationDifference);

            return(builder.ToString());
        }
Пример #3
0
        public override string ToString()
        {
            var builder = new StringBuilder();

            builder.AppendFormat("\nid: {0}\n", Id);
            builder.AppendFormat("name: {0}\n", Name ?? string.Empty);
            builder.AppendFormat("climbCategory: {0}\n", ClimbCategory);
            builder.AppendFormat("TimeRidden: {0}\n", TimeRidden);
            builder.AppendFormat("RidersRidden: {0}\n", RidersRidden);
            builder.AppendFormat("StartCoordinate: {0}\n", StartCoordinate != null ? StartCoordinate.ToString() : string.Empty);
            builder.AppendFormat("EndCoordinate: {0}\n", EndCoordinate != null ? EndCoordinate.ToString() : string.Empty);
            builder.AppendFormat("ElevationDifference: {0}\n", ElevationDifference);
            builder.AppendFormat("KingOfMountain: {0}\n", KingOfMountain != null ? KingOfMountain.ToString() : string.Empty);

            return(builder.ToString());
        }
Пример #4
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            if (StartCoordinate != null)
            {
                sb.Append(StartCoordinate.ToString());
                sb.Append(", ");
            }
            if (EndCoordinate != null)
            {
                sb.Append(EndCoordinate.ToString());
                sb.Append(", ");
            }
            sb.Append(string.Format("ZoneColor={0}, OppositeAxisTitle={1}", ZoneColorName, OppositeAxisTitle));

            return(sb.ToString());
        }
Пример #5
0
        public override string ToString()
        {
            var builder = new StringBuilder();

            builder.AppendFormat("\nid: {0}\n", Id);
            builder.AppendFormat("name: {0}\n", Name ?? string.Empty);
            builder.AppendFormat("startDateLocal: {0}\n", StartDateLocal ?? string.Empty);
            builder.AppendFormat("elapsedTime: {0}\n", ElapsedTime);
            builder.AppendFormat("movingTime: {0}\n", MovingTime);
            builder.AppendFormat("distance: {0}\n", Distance);
            builder.AppendFormat("averageSpeed: {0}\n", AverageSpeed);
            builder.AppendFormat("elevationGain: {0}\n", ElevationGain);
            builder.AppendFormat("location: {0}\n", Location ?? string.Empty);
            builder.AppendFormat("StartCoordinate: {0}\n", StartCoordinate != null ? StartCoordinate.ToString() : string.Empty);
            builder.AppendFormat("EndCoordinate: {0}\n", EndCoordinate != null ? EndCoordinate.ToString() : string.Empty);

            return(builder.ToString());
        }
Пример #6
0
        public override int GetHashCode()
        {
            int hashCode = 0;

            if (StartCoordinate != null)
            {
                hashCode ^= StartCoordinate.GetHashCode();
            }
            if (EndCoordinate != null)
            {
                hashCode ^= EndCoordinate.GetHashCode();
            }
            if (!string.IsNullOrEmpty(ZoneColorName))
            {
                hashCode ^= ZoneColorName.GetHashCode();
            }
            if (!string.IsNullOrEmpty(OppositeAxisTitle))
            {
                hashCode ^= OppositeAxisTitle.GetHashCode();
            }

            return(hashCode);
        }