Beispiel #1
0
        public EnsoCommand(string name, string postfix, string description, string help, EnsoPostfixType postfixType)
        {
            if (name == null)
            {
                throw new ArgumentNullException("command");
            }

            if (postfix == null && (postfixType == EnsoPostfixType.Arbitrary || postfixType == EnsoPostfixType.Bounded))
            {
                throw new ArgumentNullException("postfix");
            }

            if (description == null)
            {
                throw new ArgumentNullException("description");
            }

            if (help == null)
            {
                throw new ArgumentNullException("help");
            }

            this.name        = name;
            this.postfix     = postfix;
            this.description = description;
            this.help        = help;
            this.postfixType = postfixType;
        }
Beispiel #2
0
 public Command(string name, string postfix, string description, string help, EnsoPostfixType postfixType, ICommandsProvider provider, bool canUseTextSelectionForParameter, bool canUseFileSelectionForParameter, ParameterInputArguments parameterInputArguments, params Type[] supportedParameterTypeProvidersArray)
 {
     this.Name        = name;
     this.Postfix     = postfix;
     this.Description = description;
     this.Help        = help;
     this.PostfixType = postfixType;
     this.provider    = provider;
     this.supportedParameterTypeProviders = new List <Type>();
     this.canUseTextSelectionForParameter = canUseTextSelectionForParameter;
     this.canUseFileSelectionForParameter = canUseFileSelectionForParameter;
     this.supportedParameterTypeProviders.AddRange(supportedParameterTypeProvidersArray);
     this.parameterInputArguments = parameterInputArguments;
     this.parametersOnExecute     = new List <IWorkItem>();
 }