Пример #1
0
            public SegmentDetailsV2 ToSegmentDetails()
            {
                var seg = new SegmentDetailsV2
                {
                    KingOfMountain      = KingOfMountain,
                    ClimbCategory       = ClimbCategory,
                    TimeRidden          = TimeRidden,
                    RidersRidden        = RidersRidden,
                    Name                = Name,
                    Id                  = Id,
                    ElevationDifference = ElevationDifference
                };

                if (StartCoordinate != null && StartCoordinate.Length == 2)
                {
                    seg.StartCoordinate = new Coordinate {
                        Latitude = StartCoordinate[0], Longitude = StartCoordinate[1]
                    };
                }

                if (EndCoordinate != null && EndCoordinate.Length == 2)
                {
                    seg.EndCoordinate = new Coordinate {
                        Latitude = EndCoordinate[0], Longitude = EndCoordinate[1]
                    };
                }

                return(seg);
            }
Пример #2
0
            public SegmentDetailsV2 ToSegmentDetails()
            {
                var seg = new SegmentDetailsV2
                {
                    KingOfMountain = KingOfMountain,
                    ClimbCategory = ClimbCategory,
                    TimeRidden = TimeRidden,
                    RidersRidden = RidersRidden,
                    Name = Name,
                    Id = Id,
                    ElevationDifference = ElevationDifference
                };

                if (StartCoordinate != null && StartCoordinate.Length == 2)
                {
                    seg.StartCoordinate = new Coordinate { Latitude = StartCoordinate[0], Longitude = StartCoordinate[1] };
                }

                if (EndCoordinate != null && EndCoordinate.Length == 2)
                {
                    seg.EndCoordinate = new Coordinate { Latitude = EndCoordinate[0], Longitude = EndCoordinate[1] };
                }

                return seg;
            }