-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
47 lines (39 loc) · 1.25 KB
/
Program.cs
File metadata and controls
47 lines (39 loc) · 1.25 KB
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
42
43
44
45
46
47
using AppX;
using CLI;
using System;
namespace ModuleEditor
{
class Program
{
static void Main(string[] args)
{
// Creates a broker with the standard commands
var broker = new CommandBroker();
broker.AddCommand(new HelpCommand(broker));
broker.AddCommand(new ExitCommand());
broker.AddCommand(new ClearCommand());
broker.AddCommand(new ImportCommand(broker));
broker.AddCommand(new ExportCommand(broker));
broker.AddCommand(new MountCommand(broker));
broker.AddCommand(new PersistCommand(broker));
broker.AddCommand(new ListCommand(broker));
broker.AddCommand(new GetCommand(broker));
broker.AddCommand(new SetCommand(broker));
broker.AddCommand(new LSCommand(broker));
broker.AddCommand(new CDCommand(broker));
broker.AddCommand(new RMCommand(broker));
Console.WriteLine("GTN Module Editor");
Console.WriteLine("Import a module to get started.");
Console.WriteLine("Enter 'help' for assistance.");
Console.WriteLine();
// Evaluates each line of input until the user quits
while (true)
{
Console.Write(broker.SelectedPath + "> ");
var line = Console.ReadLine();
if (line.Length == 0) { continue; }
broker.Run(line);
}
}
}
}