示例#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, "."));
        }
示例#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);
        }
示例#3
0
 public static string ToRegion(this HHotel hotel)
 => hotel.ToString().ToLower();
示例#4
0
文件: SKore.cs 项目: xnumad/Tanji
        /// <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, "."));
        }