Beispiel #1
0
 /// <summary>
 /// Creates an instance of the class
 /// </summary>
 /// <param name="name">name of the command</param>
 /// <param name="argumentsSyntax">arguments description of the command</param>
 /// <param name="helpText">help text of the command</param>
 /// <param name="needAssemblyPath">the command need a path to an assembly</param>
 /// <param name="alias">additional alias names of the command</param>
 /// <param name="description">description/snytax validation of the command</param>
 internal Command(string name, string argumentsSyntax, string helpText, AssemblyRequired needAssemblyPath, IEnumerable<string> alias, CommandOptionDescriptions description)
 {
     if (null == name)
         throw new ArgumentNullException("name");
     if (null == helpText)
         throw new ArgumentNullException("helpText");
     Name = name;
     HelpText = helpText;
     NeedAssemblyPath = needAssemblyPath;
     Alias = null != alias ? alias : new string[0];
     ArgumentsSyntax = null != argumentsSyntax ? argumentsSyntax : "";
     Description = description;
 }
Beispiel #2
0
 /// <summary>
 /// Creates an instance of the class
 /// </summary>
 /// <param name="name">name of the command</param>
 /// <param name="argumentsSyntax">arguments description of the command</param>
 /// <param name="helpText">help text of the command</param>
 /// <param name="needAssemblyPath">the command need a path to an assembly</param>
 /// <param name="alias">additional alias names of the command</param>
 /// <param name="description">description/snytax validation of the command</param>
 internal Command(string name, string argumentsSyntax, string helpText, AssemblyRequired needAssemblyPath, IEnumerable <string> alias, CommandOptionDescriptions description)
 {
     if (null == name)
     {
         throw new ArgumentNullException("name");
     }
     if (null == helpText)
     {
         throw new ArgumentNullException("helpText");
     }
     Name             = name;
     HelpText         = helpText;
     NeedAssemblyPath = needAssemblyPath;
     Alias            = null != alias ? alias : new string[0];
     ArgumentsSyntax  = null != argumentsSyntax ? argumentsSyntax : "";
     Description      = description;
 }