Beispiel #1
0
 private void ParseOptionalArgumentWithOptionalArgument(string argName, MemberAttribute handler)
 {
     if (_argIt.MoveNext() == true)
     {
         MemberSetter.SetArg(_t, handler, _argIt.Current);
     }
     else
     {
         throw new Exception(string.Format("Missing value for argument for {0}", argName));
     }
 }
 public void Parse()
 {
     foreach (MemberAttribute arg in _required)
     {
         if (_argIt.MoveNext())
         {
             MemberSetter.SetArg(_t, arg, _argIt.Current);
         }
         else
         {
             throw new Exception("Number of required arguments and actual arguments don't match");
         }
     }
 }