-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCommand.cs
39 lines (34 loc) · 1.04 KB
/
Command.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
namespace UConsole
{
public class Command : System.Attribute
{
public string CommandName { get { return commandName; } }
public string Description { get { return description; } }
public string Usage { get { return usage; } }
private string commandName;
private string description;
private string usage;
public Command(string command, string description, string usage)
{
this.commandName = command;
this.description = description;
this.usage = usage;
}
public Command(string command, string description)
{
this.commandName = command;
this.description = description;
this.usage = "[none]";
}
public Command(string command)
{
this.commandName = command;
this.description = "Description not available.";
this.usage = "[none]";
}
}
public interface ICommand
{
string Execute(string[] args);
}
}