Ejemplo n.º 1
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();
        }
Ejemplo n.º 2
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();
 }