Exemple #1
0
        public StationLocation(SmallDecimal absoluteLatitude, SmallDecimal absoluteLongitude, GlobeQuadrant quadrant) : this()
        {
            if (absoluteLatitude < 0 || absoluteLatitude > 90)
            {
                throw new ArgumentOutOfRangeException(nameof(absoluteLatitude));
            }
            if (absoluteLongitude < 0 || absoluteLongitude > 180)
            {
                throw new ArgumentOutOfRangeException(nameof(absoluteLongitude));
            }
            if (quadrant == default || !quadrant.IsDefined())
            {
                throw new ArgumentOutOfRangeException(nameof(quadrant));
            }

            AbsoluteLatitude  = absoluteLatitude;
            AbsoluteLongitude = absoluteLongitude;
            Quadrant          = quadrant;
        }