/// <summary>
        /// Returns the localized abbreviation for the value of direction.
        /// </summary>
        /// <param name="point">The instance of <see cref="CompassPoint"/> enum.</param>
        /// <param name="culture">An object that represents the culture for which the resource is localized.</param>
        /// <returns>Returns the localized abbreviation name.</returns>
        public static string GetAbbreviation(this CompassPoint point, CultureInfo culture)
        {
            var abbreviation = Resources.CompassPoints.ResourceManager.GetString(point.ToString(), culture);

            return(abbreviation ?? string.Empty);
        }
Beispiel #2
0
 public string GetPosition()
 {
     return($"{Coordinates.X} {Coordinates.Y} {CompassPoint.ToString().First()}");
 }
Beispiel #3
0
 public static string Short(this CompassPoint compassPoint)
 => compassPoint == CompassPoint.None
     ? "?"
     : compassPoint.ToString().ToLowerInvariant();