Exemple #1
0
        /// <summary>
        /// Initializes a new instance of <see cref="PositionalParameterDocumentation"/>
        /// </summary>
        public PositionalParameterDocumentation(ApplicationDocumentation application, CommandDocumentation?command, int position) : base(application, command)
        {
            if (position < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(position), "Position must not be negative");
            }

            Position = position;
        }
Exemple #2
0
        /// <summary>
        /// Initializes a new instance of <see cref="NamedValuedParameterDocumentation"/>.
        /// </summary>
        public NamedValuedParameterDocumentation(ApplicationDocumentation application, CommandDocumentation?command, string?name, string?shortName) : base(application, command)
        {
            if (String.IsNullOrWhiteSpace(name) && String.IsNullOrWhiteSpace(shortName))
            {
                throw new ArgumentException($"{nameof(name)} and {nameof(shortName)} must not both be empty");
            }

            Name      = name;
            ShortName = shortName;
        }
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of <see cref="ParameterCollection"/>
 /// </summary>
 /// <param name="application">The application this parameter collection belongs to.</param>
 /// <param name="command">The command that defines the parameters or <c>null</c> if the parameter is defined by a single-command application</param>
 public ParameterCollection(ApplicationDocumentation application, CommandDocumentation?command)
 {
     m_Application = application ?? throw new ArgumentNullException(nameof(application));
     m_Command     = command;
 }