Esempio n. 1
0
            public static bool TryParse(string value, out ConditionStatus result)
            {
                result = default(ConditionStatus);

                if( value=="provisional")
                    result = ConditionStatus.Provisional;
                else if( value=="working")
                    result = ConditionStatus.Working;
                else if( value=="confirmed")
                    result = ConditionStatus.Confirmed;
                else if( value=="refuted")
                    result = ConditionStatus.Refuted;
                else
                    return false;

                return true;
            }
Esempio n. 2
0
 public static string ToString(ConditionStatus value)
 {
     if( value==ConditionStatus.Provisional )
         return "provisional";
     else if( value==ConditionStatus.Working )
         return "working";
     else if( value==ConditionStatus.Confirmed )
         return "confirmed";
     else if( value==ConditionStatus.Refuted )
         return "refuted";
     else
         throw new ArgumentException("Unrecognized ConditionStatus value: " + value.ToString());
 }