Beispiel #1
0
 private static void CheckSurveyIdIsGiven(Entity.Command command)
 {
     if (OptionParser.CountOptions("i", command) != 1)
     {
         throw new Exception("You must specify the ID");
     }
 }
Beispiel #2
0
        private static void CheckCommandParametersValidity(Entity.Command command)
        {
            if (OptionParser.CountOptions("q", command) != 1)
            {
                throw new Exception("You must specify a question");
            }

            if (OptionParser.CountOptions("c", command) < 2)
            {
                throw new Exception("You must specify at least 2 choices");
            }
        }