Ejemplo n.º 1
0
        public static string ToDomain(this HHotel hotel)
        {
            if (hotel == HHotel.Unknown)
            {
                throw new ArgumentException("Hotel cannot be 'Unknown'.", nameof(hotel));
            }
            string value = hotel.ToString().ToLower();

            return(value.Length != 5 ? value : value.Insert(3, "."));
        }
Ejemplo n.º 2
0
        public static string ToDomain(this HHotel hotel)
        {
            string outCome = hotel.ToString().ToLower();

            if (hotel == HHotel.ComBr || hotel == HHotel.ComTr)
            {
                outCome = "com." + outCome.Substring(3, 2);
            }
            return(outCome);
        }
Ejemplo n.º 3
0
 public static string ToRegion(this HHotel hotel)
 => hotel.ToString().ToLower();
Ejemplo n.º 4
0
        /// <summary>
        /// Returns the domain associated with the specified <see cref="HHotel"/>.
        /// </summary>
        /// <param name="hotel">The <see cref="HHotel"/> that is associated with the wanted domain.</param>
        /// <returns></returns>
        public static string ToDomain(this HHotel hotel)
        {
            string value = hotel.ToString().ToLower();

            return(value.Length != 5 ? value : value.Insert(3, "."));
        }