コード例 #1
0
        internal CommandParameterInfo(ParameterInfo parameter)
        {
            ParameterType = parameter.ParameterType;

            var attribute = parameter.GetCustomAttribute <CommandArgumentAttribute>();

            if (attribute != null)
            {
                _description = attribute.Description;
                _default     = attribute.Default;
                _option      = attribute.Options;
            }

            Parameter = parameter;
            Attribute = attribute;
        }
コード例 #2
0
 public CommandArgumentAttribute(string description, CommandArgumentOption options, object defaultValue)
 {
     Description = description;
     Options     = options;
     Default     = defaultValue;
 }
コード例 #3
0
 public CommandArgumentAttribute(string description, CommandArgumentOption options)
     : this(description, options, null)
 {
 }
コード例 #4
0
 public CommandArgumentAttribute(string description, CommandArgumentOption options, object defaultValue)
 {
     Description = description;
     Options = options;
     Default = defaultValue;
 }
コード例 #5
0
 public CommandArgumentAttribute(string description, CommandArgumentOption options)
     : this(description, options, null)
 {
 }