예제 #1
0
        /// <summary>
        /// Returns the <see cref="FruitsVariety"/> value which represents '<paramref name="info"/>' -or- FruitsVariety.None if unable to convert.
        /// </summary>
        public static FruitsVariety GetFromFruitsInfo( FruitsInfo info )
        {
            if ( info.Level == 0 )
                return FruitsVariety.Apple;
            else if ( info.Level == 1 )
                return FruitsVariety.Banana;
            else if ( info.Level == 2 )
                return FruitsVariety.Dates;
            else if ( info.Level == 3 )
                return FruitsVariety.Grapes;
            else if ( info.Level == 4 )
                return FruitsVariety.Lemon;
            else if ( info.Level == 5 )
                return FruitsVariety.Lime;
            else if ( info.Level == 6 )
                return FruitsVariety.Orange;
            else if ( info.Level == 7 )
                return FruitsVariety.Peach;
            else if ( info.Level == 8 )
                return FruitsVariety.Pear;
            else if ( info.Level == 9 )
                return FruitsVariety.Pumpkin;
            else if ( info.Level == 10 )
                return FruitsVariety.Tomato;
            else if ( info.Level == 11 )
                return FruitsVariety.Watermelon;
            else if ( info.Level == 12 )
                return FruitsVariety.Apricot;
            else if ( info.Level == 13 )
                return FruitsVariety.Blackberries;
            else if ( info.Level == 14 )
                return FruitsVariety.Blueberries;
            else if ( info.Level == 15 )
                return FruitsVariety.Cherries;
            else if ( info.Level == 16 )
                return FruitsVariety.Cranberries;
            else if ( info.Level == 17 )
                return FruitsVariety.Grapefruit;
            else if ( info.Level == 18 )
                return FruitsVariety.Kiwi;
            else if ( info.Level == 19 )
                return FruitsVariety.Mango;
            else if ( info.Level == 20 )
                return FruitsVariety.Pineapple;
            else if ( info.Level == 21 )
                return FruitsVariety.Pomegranate;
            else if ( info.Level == 22 )
                return FruitsVariety.Strawberry;

            return FruitsVariety.None;
        }
예제 #2
0
        /// <summary>
        /// Returns the <see cref="FruitsVariety"/> value which represents '<paramref name="info"/>' -or- FruitsVariety.None if unable to convert.
        /// </summary>
        public static FruitsVariety GetFromFruitsInfo(FruitsInfo info)
        {
            if (info.Level == 0)
            {
                return(FruitsVariety.Apple);
            }
            else if (info.Level == 1)
            {
                return(FruitsVariety.Banana);
            }
            else if (info.Level == 2)
            {
                return(FruitsVariety.Dates);
            }
            else if (info.Level == 3)
            {
                return(FruitsVariety.Grapes);
            }
            else if (info.Level == 4)
            {
                return(FruitsVariety.Lemon);
            }
            else if (info.Level == 5)
            {
                return(FruitsVariety.Lime);
            }
            else if (info.Level == 6)
            {
                return(FruitsVariety.Orange);
            }
            else if (info.Level == 7)
            {
                return(FruitsVariety.Peach);
            }
            else if (info.Level == 8)
            {
                return(FruitsVariety.Pear);
            }
            else if (info.Level == 9)
            {
                return(FruitsVariety.Pumpkin);
            }
            else if (info.Level == 10)
            {
                return(FruitsVariety.Tomato);
            }
            else if (info.Level == 11)
            {
                return(FruitsVariety.Watermelon);
            }
            else if (info.Level == 12)
            {
                return(FruitsVariety.Apricot);
            }
            else if (info.Level == 13)
            {
                return(FruitsVariety.Blackberries);
            }
            else if (info.Level == 14)
            {
                return(FruitsVariety.Blueberries);
            }
            else if (info.Level == 15)
            {
                return(FruitsVariety.Cherries);
            }
            else if (info.Level == 16)
            {
                return(FruitsVariety.Cranberries);
            }
            else if (info.Level == 17)
            {
                return(FruitsVariety.Grapefruit);
            }
            else if (info.Level == 18)
            {
                return(FruitsVariety.Kiwi);
            }
            else if (info.Level == 19)
            {
                return(FruitsVariety.Mango);
            }
            else if (info.Level == 20)
            {
                return(FruitsVariety.Pineapple);
            }
            else if (info.Level == 21)
            {
                return(FruitsVariety.Pomegranate);
            }
            else if (info.Level == 22)
            {
                return(FruitsVariety.Strawberry);
            }

            return(FruitsVariety.None);
        }
예제 #3
0
 public static FruitsVariety GetFromFruitsInfo(FruitsInfo info)
 {
     if (info.Level == 0)
     {
         return(FruitsVariety.Apple);
     }
     else if (info.Level == 1)
     {
         return(FruitsVariety.Banana);
     }
     else if (info.Level == 2)
     {
         return(FruitsVariety.Dates);
     }
     else if (info.Level == 3)
     {
         return(FruitsVariety.Grapes);
     }
     else if (info.Level == 4)
     {
         return(FruitsVariety.Lemon);
     }
     else if (info.Level == 5)
     {
         return(FruitsVariety.Lime);
     }
     else if (info.Level == 6)
     {
         return(FruitsVariety.Orange);
     }
     else if (info.Level == 7)
     {
         return(FruitsVariety.Peach);
     }
     else if (info.Level == 8)
     {
         return(FruitsVariety.Pear);
     }
     else if (info.Level == 9)
     {
         return(FruitsVariety.Pumpkin);
     }
     else if (info.Level == 10)
     {
         return(FruitsVariety.Tomato);
     }
     else if (info.Level == 11)
     {
         return(FruitsVariety.Watermelon);
     }
     else if (info.Level == 12)
     {
         return(FruitsVariety.Apricot);
     }
     else if (info.Level == 13)
     {
         return(FruitsVariety.Blackberry);
     }
     else if (info.Level == 14)
     {
         return(FruitsVariety.Blueberry);
     }
     else if (info.Level == 15)
     {
         return(FruitsVariety.Cherry);
     }
     else if (info.Level == 16)
     {
         return(FruitsVariety.Cranberry);
     }
     else if (info.Level == 17)
     {
         return(FruitsVariety.Grapefruit);
     }
     else if (info.Level == 18)
     {
         return(FruitsVariety.Kiwi);
     }
     else if (info.Level == 19)
     {
         return(FruitsVariety.Mango);
     }
     else if (info.Level == 20)
     {
         return(FruitsVariety.Pineapple);
     }
     else if (info.Level == 21)
     {
         return(FruitsVariety.Pomegranate);
     }
     else if (info.Level == 22)
     {
         return(FruitsVariety.Strawberry);
     }
     else if (info.Level == 23)
     {
         return(FruitsVariety.Almond);
     }
     else if (info.Level == 24)
     {
         return(FruitsVariety.Asparagus);
     }
     else if (info.Level == 25)
     {
         return(FruitsVariety.Avocado);
     }
     else if (info.Level == 26)
     {
         return(FruitsVariety.Beet);
     }
     else if (info.Level == 27)
     {
         return(FruitsVariety.BlackRaspberry);
     }
     else if (info.Level == 28)
     {
         return(FruitsVariety.Cantaloupe);
     }
     else if (info.Level == 29)
     {
         return(FruitsVariety.Carrot);
     }
     else if (info.Level == 30)
     {
         return(FruitsVariety.Cauliflower);
     }
     else if (info.Level == 31)
     {
         return(FruitsVariety.Celery);
     }
     else if (info.Level == 32)
     {
         return(FruitsVariety.Coconut);
     }
     else if (info.Level == 33)
     {
         return(FruitsVariety.Corn);
     }
     else if (info.Level == 34)
     {
         return(FruitsVariety.Cucumber);
     }
     else if (info.Level == 35)
     {
         return(FruitsVariety.GreenSquash);
     }
     else if (info.Level == 36)
     {
         return(FruitsVariety.HoneydewMelon);
     }
     else if (info.Level == 37)
     {
         return(FruitsVariety.Onion);
     }
     else if (info.Level == 38)
     {
         return(FruitsVariety.Peanut);
     }
     else if (info.Level == 39)
     {
         return(FruitsVariety.Pistacio);
     }
     else if (info.Level == 40)
     {
         return(FruitsVariety.Potato);
     }
     else if (info.Level == 41)
     {
         return(FruitsVariety.Radish);
     }
     else if (info.Level == 42)
     {
         return(FruitsVariety.RedRaspberry);
     }
     else if (info.Level == 43)
     {
         return(FruitsVariety.Spinach);
     }
     else if (info.Level == 44)
     {
         return(FruitsVariety.Squash);
     }
     else if (info.Level == 45)
     {
         return(FruitsVariety.SweetPotato);
     }
     else if (info.Level == 46)
     {
         return(FruitsVariety.Turnip);
     }
     return(FruitsVariety.None);
 }