Example #1
0
            public static bool TryParse(string value, out StudyInterventionModel result)
            {
                result = default(StudyInterventionModel);

                if (value == "cross-over")
                {
                    result = StudyInterventionModel.CrossOver;
                }
                else if (value == "factorial")
                {
                    result = StudyInterventionModel.Factorial;
                }
                else if (value == "parallel")
                {
                    result = StudyInterventionModel.Parallel;
                }
                else if (value == "single group")
                {
                    result = StudyInterventionModel.SingleGroup;
                }
                else
                {
                    return(false);
                }

                return(true);
            }
Example #2
0
 public static string ToString(StudyInterventionModel value)
 {
     if (value == StudyInterventionModel.CrossOver)
     {
         return("cross-over");
     }
     else if (value == StudyInterventionModel.Factorial)
     {
         return("factorial");
     }
     else if (value == StudyInterventionModel.Parallel)
     {
         return("parallel");
     }
     else if (value == StudyInterventionModel.SingleGroup)
     {
         return("single group");
     }
     else
     {
         throw new ArgumentException("Unrecognized StudyInterventionModel value: " + value.ToString());
     }
 }
Example #3
0
            public static bool TryParse(string value, out StudyInterventionModel result)
            {
                result = default(StudyInterventionModel);

                if( value=="cross-over")
                    result = StudyInterventionModel.CrossOver;
                else if( value=="factorial")
                    result = StudyInterventionModel.Factorial;
                else if( value=="parallel")
                    result = StudyInterventionModel.Parallel;
                else if( value=="single group")
                    result = StudyInterventionModel.SingleGroup;
                else
                    return false;

                return true;
            }
Example #4
0
 public static string ToString(StudyInterventionModel value)
 {
     if( value==StudyInterventionModel.CrossOver )
         return "cross-over";
     else if( value==StudyInterventionModel.Factorial )
         return "factorial";
     else if( value==StudyInterventionModel.Parallel )
         return "parallel";
     else if( value==StudyInterventionModel.SingleGroup )
         return "single group";
     else
         throw new ArgumentException("Unrecognized StudyInterventionModel value: " + value.ToString());
 }