Example #1
0
 internal void Validate(ArgHook.HookContext context)
 {
     context.RunBeforeValidateDefinition();
     ValidateArguments(Arguments);
     ValidateActionAliases();
     foreach (var action in Actions)
     {
         if (action.Aliases.Count == 0)
         {
             throw new InvalidArgDefinitionException("One of your actions has no aliases");
         }
         ValidateArguments(Arguments.Union(action.Arguments));
         if (action.ActionMethod == null)
         {
             throw new InvalidArgDefinitionException("The action '" + action.DefaultAlias + "' has no ActionMethod defined");
         }
     }
 }