Cleaned up params implementation

This commit is contained in:
RogueException
2016-07-30 22:24:02 -03:00
parent 6732e256fb
commit a04cf5201a
3 changed files with 20 additions and 32 deletions

View File

@@ -1,11 +1,9 @@
using System;
using System.Diagnostics;
using System.Reflection;
using System.Threading.Tasks;
namespace Discord.Commands
{
//TODO: Add support for Multiple
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
public class CommandParameter
{
@@ -15,21 +13,19 @@ namespace Discord.Commands
public string Description { get; }
public bool IsOptional { get; }
public bool IsRemainder { get; }
public bool IsParams { get; }
public bool IsMultiple { get; }
public Type Type { get; }
public Type UnderlyingType { get; }
internal object DefaultValue { get; }
public CommandParameter(string name, string description, Type type, Type underlyingType, TypeReader reader, bool isOptional, bool isRemainder, bool isParams, object defaultValue)
public CommandParameter(string name, string description, Type type, TypeReader reader, bool isOptional, bool isRemainder, bool isMultiple, object defaultValue)
{
Name = name;
Description = description;
Type = type;
UnderlyingType = underlyingType;
_reader = reader;
IsOptional = isOptional;
IsRemainder = isRemainder;
IsParams = isParams;
IsMultiple = isMultiple;
DefaultValue = defaultValue;
}