-
Notifications
You must be signed in to change notification settings - Fork 1
/
ShowStorageCommand.cs
41 lines (35 loc) · 1.1 KB
/
ShowStorageCommand.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
40
41
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AutomataConverter
{
class ShowStorageCommand : ICommand
{
private AutomataConverterApplication app;
public string Help { get { return "Выводит список хранимых автоматов"; } }
public string Name { get { return "show"; } }
public void Execute(params string[] parameters)
{
try
{
Console.WriteLine(app.Storage.ToString());
}
catch (IndexOutOfRangeException e)
{
Console.WriteLine("Слишком мало параметров команды");
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
public string Description { get { return "show"; } }
public string[] Synonyms { get { return new string[] { }; } }
public ShowStorageCommand(AutomataConverterApplication app)
{
this.app = app;
}
}
}