public static void Main()
        {
            InitializeLogging();

            var dispatcher = new DispatcherCommand("root");

            dispatcher.RegisterCommand(new UseCommand());
            dispatcher.RegisterCommand(new FetchMobsCommand());
            dispatcher.RegisterCommand(new FetchOperationsCommand());
            dispatcher.RegisterCommand(new ChangeDirectoryCommand());
            dispatcher.RegisterCommand(new ListDirectoryCommand());
            dispatcher.RegisterCommand(new InvokeCommand());
            dispatcher.RegisterCommand(new SetCommand());
            dispatcher.RegisterCommand(new GetCommand());
            dispatcher.RegisterCommand(new GraphCommand());
            dispatcher.RegisterCommand(new TreeCommand());
            dispatcher.RegisterCommand(new ExitCommand());
            dispatcher.RegisterCommand(new DispatcherMultiCommand(
                                           "a",
                                           new[] { "use tcp 127.0.0.1:21337", "fetch-mobs", "cd !!UdpDebugMob", "fetch-ops", "ls" },
                                           dispatcher));
            dispatcher.RegisterCommand(new DispatcherMultiCommand(
                                           "aa",
                                           new[] { "use tcp 127.0.0.1:21338", "fetch-mobs", "cd !!UdpDebugMob", "fetch-ops", "ls" },
                                           dispatcher));
            dispatcher.RegisterCommand(new DispatcherMultiCommand(
                                           "aaa",
                                           new[] { "use tcp 127.0.0.1:21339", "fetch-mobs", "cd !!UdpDebugMob", "fetch-ops", "ls" },
                                           dispatcher));
            new ReplCore(dispatcher).Run();
        }
      public static void Main() {
         InitializeLogging();

         var dispatcher = new DispatcherCommand("root");
         dispatcher.RegisterCommand(new UseCommand());
         dispatcher.RegisterCommand(new FetchMobsCommand());
         dispatcher.RegisterCommand(new FetchOperationsCommand());
         dispatcher.RegisterCommand(new ChangeDirectoryCommand());
         dispatcher.RegisterCommand(new ListDirectoryCommand());
         dispatcher.RegisterCommand(new InvokeCommand());
         dispatcher.RegisterCommand(new SetCommand());
         dispatcher.RegisterCommand(new GetCommand());
         dispatcher.RegisterCommand(new GraphCommand());
         dispatcher.RegisterCommand(new TreeCommand());
         dispatcher.RegisterCommand(new ExitCommand());
         dispatcher.RegisterCommand(new DispatcherMultiCommand(
            "a",
            new[] { "use tcp 127.0.0.1:21337", "fetch-mobs", "cd !!UdpDebugMob", "fetch-ops", "ls" },
            dispatcher));
         dispatcher.RegisterCommand(new DispatcherMultiCommand(
            "aa",
            new[] { "use tcp 127.0.0.1:21338", "fetch-mobs", "cd !!UdpDebugMob", "fetch-ops", "ls" },
            dispatcher));
         dispatcher.RegisterCommand(new DispatcherMultiCommand(
            "aaa",
            new[] { "use tcp 127.0.0.1:21339", "fetch-mobs", "cd !!UdpDebugMob", "fetch-ops", "ls" },
            dispatcher));
         new ReplCore(dispatcher).Run();
      }
Exemple #3
0
        public static void Main(string[] args)
        {
            Console.WindowWidth = Console.BufferWidth = 120;
            var streamFactory = new StreamFactory();
            IFileSystemProxy  fileSystemProxy   = new FileSystemProxy(streamFactory);
            DargonNodeFactory dargonNodeFactory = new DargonNodeFactoryImpl();
            var dispatcher = new DispatcherCommand("root");

            dispatcher.RegisterCommand(new ExitCommand());
            dispatcher.RegisterCommand(new LoadSolutionCommand(streamFactory, dargonNodeFactory));
            dispatcher.RegisterCommand(new ChangeDirectoryCommand());
            dispatcher.RegisterCommand(new ListDirectoryCommand());
            dispatcher.RegisterCommand(new PrintWorkingDirectoryCommand());
            dispatcher.RegisterCommand(new AliasCommand("dir", new ListDirectoryCommand()));
            dispatcher.RegisterCommand(new DumpCommand(fileSystemProxy));
            dispatcher.RegisterCommand(new SetWindowWidthCommand());
            dispatcher.Eval(LoadSolutionCommand.kLoadSolutionCommand + " " + (ConfigurationManager.AppSettings?["radsPath"] ?? ""));
            new ReplCore(dispatcher).Run();
        }
 public static void Main(string[] args)
 {
     Console.WindowWidth = Console.BufferWidth = 120;
      var streamFactory = new StreamFactory();
      IFileSystemProxy fileSystemProxy = new FileSystemProxy(streamFactory);
      DargonNodeFactory dargonNodeFactory = new DargonNodeFactoryImpl();
      var dispatcher = new DispatcherCommand("root");
      dispatcher.RegisterCommand(new ExitCommand());
      dispatcher.RegisterCommand(new LoadSolutionCommand(streamFactory, dargonNodeFactory));
      dispatcher.RegisterCommand(new ChangeDirectoryCommand());
      dispatcher.RegisterCommand(new ListDirectoryCommand());
      dispatcher.RegisterCommand(new PrintWorkingDirectoryCommand());
      dispatcher.RegisterCommand(new AliasCommand("dir", new ListDirectoryCommand()));
      dispatcher.RegisterCommand(new DumpCommand(fileSystemProxy));
      dispatcher.RegisterCommand(new SetWindowWidthCommand());
      dispatcher.Eval(LoadSolutionCommand.kLoadSolutionCommand + " " + (ConfigurationManager.AppSettings?["radsPath"] ?? ""));
      new ReplCore(dispatcher).Run();
 }