public InputService( IKernel32Api kernel32Api, PipeStore pipeStore, ProcessService processService) { _kernel32Api = kernel32Api ?? throw new ArgumentNullException(nameof(kernel32Api)); _inputPipe = pipeStore?.Invoke(PipeType.Input) ?? throw new ArgumentNullException(nameof(pipeStore)); _processService = processService ?? throw new ArgumentNullException(nameof(processService)); }
public ProcessService( IKernel32Api kernel32Api, InputArguments inputArguments, ILogger logger) { _kernel32Api = kernel32Api ?? throw new ArgumentNullException(nameof(kernel32Api)); _inputArguments = inputArguments ?? throw new ArgumentNullException(nameof(inputArguments)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _cancellationTokenSource = new CancellationTokenSource(); }
public OutputService( IKernel32Api kernel32Api, PipeStore pipeStore, ProcessService processService, InputService inputService) { _kernel32Api = kernel32Api ?? throw new ArgumentNullException(nameof(kernel32Api)); _outputPipe = pipeStore(PipeType.Output) ?? throw new ArgumentNullException(nameof(pipeStore)); _processService = processService ?? throw new ArgumentNullException(nameof(processService)); _inputService = inputService ?? throw new ArgumentNullException(nameof(inputService)); inputService.Resize += InputService_Resize; }
public OutputService( ITerminalContainer terminalContainer, IKernel32Api kernel32Api, ILogger logger) { _terminalContainer = terminalContainer ?? throw new ArgumentNullException(nameof(terminalContainer)); _kernel32Api = kernel32Api ?? throw new ArgumentNullException(nameof(kernel32Api)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _tasks = new Dictionary <ITerminal, Task>(); _previousBuffers = new ConcurrentDictionary <ITerminal, CharInfo[]>(); terminalContainer.ActiveTerminalChanged += TerminalContainer_ActiveTerminalChanged; }
public InputService( ITerminalContainer terminalContainer, IKernel32Api kernel32Api, IWinTerMulConfiguration configuration, ITerminalFactory terminalFactory) { _terminalContainer = terminalContainer ?? throw new ArgumentNullException(nameof(terminalContainer)); _kernel32Api = kernel32Api ?? throw new ArgumentNullException(nameof(kernel32Api)); _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); _terminalFactory = terminalFactory ?? throw new ArgumentNullException(nameof(terminalFactory)); _prefixKeyWithoutCtrl = _configuration.PrefixKey[2]; _prefixKey = _prefixKeyWithoutCtrl - 'a' + 1; _charactersToIgnoreAfterPrefixKey = new[] { _prefixKey, _prefixKeyWithoutCtrl, 0 }; _kernel32Api.TreatControlCAsInput(); }