Projekt

Obecné

Profil

Stáhnout (703 Bajtů) Statistiky
| Větev: | Tag: | Revize:
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
	public enum Commands
10
	{
11
		RETRAIN, ROLLBACK, DATA_LIST, NEW_DATA, HELP
12
	}
13

    
14
	public class Command
15
	{
16
		public string MainCommand { get; set; }
17
		public Dictionary<string, List<string>> FlagsAndData { get; }
18
		private string lastFlag;
19

    
20
		public Command()
21
		{
22
			MainCommand = "";
23
			FlagsAndData = new Dictionary<string, List<string>>();
24
			lastFlag = "";
25
		}
26

    
27
		public void AddFlag(string flag)
28
		{
29
			FlagsAndData.Add(flag, new List<string>());
30
			lastFlag = flag;
31
		}
32

    
33
		public void AddData(string data)
34
		{
35
			FlagsAndData[lastFlag].Add(data);
36
		}
37
	}
38
}
(1-1/2)