private static int RunCommand(IOutputWrapper writer, IMediator mediator, InputCommand command)
        {
            // TODO: change to dynamic one with dictionary
            switch (command.Command.ToLower())
            {
            case "compress":
                using (var compress = new MultiThreadCompressionService(mediator))
                {
                    compress.Compress(command.InputFileName, command.OutputFileName);
                }
                break;

            case "decompress":
                using (var compress = new MultiThreadCompressionService(mediator))
                {
                    compress.Decompress(command.InputFileName, command.OutputFileName);
                }
                break;

            default:
                writer.WriteLine("Usupported command: " + command.Command);
                return(1);
            }
            return(0);
        }
Exemplo n.º 2
0
 public InputView(IOutputWrapper outputWrapper, int posX, int posY, int cursorPosition)
 {
     _outputWrapper = outputWrapper;
     _posX          = posX;
     _posY          = posY;
     if (_inputLine == null || _inputLine == "")
     {
         _inputLine = "Type /search to find servers.";
     }
     _xCursorPosition = cursorPosition;
 }
 public ServerTableView(IOutputWrapper outputWrapper, int posX, int posY)
 {
     _outputWrapper = outputWrapper;
     _posX          = posX;
     _posY          = posY;
     if (_serverTableContent == null || _serverTableContent.Length == 0)
     {
         _serverTableContent = new StringBuilder("");
     }
     _lobbyInfo          = DEFAULT_STRING;
     _serverTableContent = new StringBuilder();
 }
 private static InputCommand ReadCommand(string[] args, IOutputWrapper writer)
 {
     try
     {
         return(new InputCommand(args));
     }
     catch (IOException e)
     {
         writer.WriteLine(e.Message);
         writer.WriteLine(_commandUsageText);
         return(null);
     }
 }
 public FinishSkull1View(IOutputWrapper outputWrapper, int posX, int posY)
 {
     _outputWrapper = outputWrapper;
     _posX          = posX;
     _posY          = posY;
 }
Exemplo n.º 6
0
 public CommandLineClient(IOutputWrapper wrapper, IoCConfig appconfig, IAppDomainLoader loader)
 {
     _wrapper = wrapper;
     _appconfig = appconfig;
     _loader = loader;
 }
Exemplo n.º 7
0
 public TurnInfoOutputView(IOutputWrapper outputWrapper, int posX, int posY)
 {
     _outputWrapper = outputWrapper;
     _posX          = posX;
     _posY          = posY;
 }
Exemplo n.º 8
0
 public LobbyInfoDisplayView(IOutputWrapper outputWrapper, int posX, int posY)
 {
     _outputWrapper = outputWrapper;
     _posX          = posX;
     _posY          = posY;
 }
 public EnterToRefreshView(IOutputWrapper outputWrapper, int posX, int posY)
 {
     _outputWrapper = outputWrapper;
     _posX          = posX;
     _posY          = posY;
 }
 public ErrorView(IOutputWrapper outputWrapper, int posX, int posY)
 {
     _outputWrapper = outputWrapper;
     _posX          = posX;
     _posY          = posY;
 }
Exemplo n.º 11
0
 public MainMenuOutputView(IOutputWrapper outputWrapper, int posX, int posY)
 {
     _outputWrapper = outputWrapper;
     _posX          = posX;
     _posY          = posY;
 }
Exemplo n.º 12
0
 public CommandListOutputView(IOutputWrapper outputWrapper, int posX, int posY)
 {
     _outputWrapper = outputWrapper;
     _posX          = posX;
     _posY          = posY;
 }
Exemplo n.º 13
0
 public FileProcessor(IArgumentParser argumentParser, IFileInformationProvider fileInformationProvider, IOutputWrapper outputWrapper)
 {
     _argumentParser          = argumentParser;
     _fileInformationProvider = fileInformationProvider;
     _outputWrapper           = outputWrapper;
 }
Exemplo n.º 14
0
 public BoardOutputView(IOutputWrapper outputWrapper, int posX, int posY)
 {
     _outputWrapper = outputWrapper;
     _posX          = posX;
     _posY          = posY;
 }
Exemplo n.º 15
0
 public AfterTurnOutputView(IOutputWrapper outputWrapper, int posX, int posY)
 {
     _outputWrapper = outputWrapper;
     _posX          = posX;
     _posY          = posY;
 }