Example #1
0
        public static string ToStringHuman(this FoodPoisonCause cause)
        {
            string result;

            switch (cause)
            {
            case FoodPoisonCause.Unknown:
                result = "Unknown".Translate();
                break;

            case FoodPoisonCause.IncompetentCook:
                result = "FoodPoisonCause_IncompetentCook".Translate();
                break;

            case FoodPoisonCause.FilthyKitchen:
                result = "FoodPoisonCause_FilthyKitchen".Translate();
                break;

            case FoodPoisonCause.Rotten:
                result = "FoodPoisonCause_Rotten".Translate();
                break;

            case FoodPoisonCause.DangerousFoodType:
                result = "FoodPoisonCause_DangerousFoodType".Translate();
                break;

            default:
                result = cause.ToString();
                break;
            }
            return(result);
        }
 public static string ToStringHuman(this FoodPoisonCause cause)
 {
     return(cause switch
     {
         FoodPoisonCause.Unknown => "UnknownLower".Translate().CapitalizeFirst(),
         FoodPoisonCause.IncompetentCook => "FoodPoisonCause_IncompetentCook".Translate(),
         FoodPoisonCause.FilthyKitchen => "FoodPoisonCause_FilthyKitchen".Translate(),
         FoodPoisonCause.Rotten => "FoodPoisonCause_Rotten".Translate(),
         FoodPoisonCause.DangerousFoodType => "FoodPoisonCause_DangerousFoodType".Translate(),
         _ => cause.ToString(),
     });
        public static string ToStringHuman(this FoodPoisonCause cause)
        {
            switch (cause)
            {
            case FoodPoisonCause.Unknown:
                return("UnknownLower".Translate().CapitalizeFirst());

            case FoodPoisonCause.IncompetentCook:
                return("FoodPoisonCause_IncompetentCook".Translate());

            case FoodPoisonCause.FilthyKitchen:
                return("FoodPoisonCause_FilthyKitchen".Translate());

            case FoodPoisonCause.Rotten:
                return("FoodPoisonCause_Rotten".Translate());

            case FoodPoisonCause.DangerousFoodType:
                return("FoodPoisonCause_DangerousFoodType".Translate());

            default:
                return(cause.ToString());
            }
        }