1
|
using System;
|
2
|
using System.Collections.Generic;
|
3
|
using System.Linq;
|
4
|
using System.Text;
|
5
|
using System.Threading.Tasks;
|
6
|
|
7
|
namespace ServerApp.User
|
8
|
{
|
9
|
|
10
|
public class Command
|
11
|
{
|
12
|
public string WholeCommand { get; set; }
|
13
|
public string MainCommand { get; set; }
|
14
|
public Dictionary<string, List<string>> FlagsAndData { get; }
|
15
|
private string lastFlag;
|
16
|
|
17
|
public Command()
|
18
|
{
|
19
|
MainCommand = "";
|
20
|
FlagsAndData = new Dictionary<string, List<string>>();
|
21
|
lastFlag = "";
|
22
|
}
|
23
|
|
24
|
public void AddFlag(string flag)
|
25
|
{
|
26
|
FlagsAndData.Add(flag, new List<string>());
|
27
|
lastFlag = flag;
|
28
|
}
|
29
|
|
30
|
public void AddData(string data)
|
31
|
{
|
32
|
FlagsAndData[lastFlag].Add(data);
|
33
|
}
|
34
|
}
|
35
|
}
|