26 lines
561 B
C#
26 lines
561 B
C#
using CommandHandler;
|
|
using CommandHandler.Navigation;
|
|
using CommandHandler.Navigation.States;
|
|
|
|
Console.WriteLine("Hello, World!");
|
|
|
|
INavigationContext context = new NavigationContext();
|
|
context.SetState(new NavigationMainState());
|
|
|
|
while (ApplicationContext.IsRan)
|
|
{
|
|
try
|
|
{
|
|
var line = Console.ReadLine();
|
|
if (!string.IsNullOrEmpty(line))
|
|
{
|
|
var command = context.GetCommand(line);
|
|
await command.Execute();
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Console.WriteLine(ex.ToString());
|
|
}
|
|
}
|