示例#1
0
        public WurmDay(string name)
        {
            if (name == null)
            {
                throw new ArgumentNullException(nameof(name));
            }
            name = name.ToUpperInvariant();

            switch (name)
            {
            case AntNameNormalized:
                wurmDayId = WurmDayId.Ant;
                break;

            case LuckNameNormalized:
                wurmDayId = WurmDayId.Luck;
                break;

            case WurmNameNormalized:
                wurmDayId = WurmDayId.Wurm;
                break;

            case WrathNameNormalized:
                wurmDayId = WurmDayId.Wrath;
                break;

            case TearsNameNormalized:
                wurmDayId = WurmDayId.Tears;
                break;

            case SleepNameNormalized:
                wurmDayId = WurmDayId.Sleep;
                break;

            case AwakeningNameNormalized:
                wurmDayId = WurmDayId.Awakening;
                break;

            default:
                throw new WurmApiException("Invalid wurm day");
            }
        }
示例#2
0
 public WurmDay(WurmDayId wurmDayId)
 {
     this.wurmDayId = wurmDayId;
 }