public ProcessLogger(string processName, ISafeConsole console) { _console = console; _processName = processName; _outputBuilder = new StringBuilder(); _errorBuilder = new StringBuilder(); }
protected BaseProgramRunner( IExecutableResolver resolver, ISafeConsole safeConsole, IDirectory directory, string commandLine) { _safeConsole = safeConsole; var argumentList = GetArgumentList(commandLine); _processName = argumentList[0]; var startInfo = new ProcessStartInfo(resolver.Resolve(_processName)); argumentList.RemoveAt(0); _arguments = string.Empty; if (Enumerable.Any <string>(argumentList)) { _arguments = AggregateArguments(argumentList); startInfo.Arguments = _arguments; } if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { // Not Supported on Unix //_startInfo.LoadUserProfile = true; } //_startInfo.CreateNoWindow = true; startInfo.WindowStyle = ProcessWindowStyle.Hidden; startInfo.UseShellExecute = false; startInfo.WorkingDirectory = directory.GetCurrentDirectory(); _process = new Process(); _process.StartInfo = startInfo; }
public InteractiveProgramRunner( IExecutableResolver resolver, ISafeConsole safeConsole, IDirectory directory, string commandLine) : base(resolver, safeConsole, directory, commandLine) { }
public ProgramRunnerFactory(IExecutableResolver resolver, ISafeConsole safeConsole, IDirectory directory) { _resolver = resolver; _safeConsole = safeConsole; _directory = directory; }
/// <summary> /// Initializes a new instance of the <see cref="ColoredConsoleAppender" /> class. /// </summary> /// <param name="provider">The provider.</param> /// <param name="console">The console.</param> public ColoredConsoleAppender(ILogFormatProvider provider = null, ISafeConsole console = null) { if (console == null) { console = SafeConsoleAdapter.Instance; } _console = console; if (provider == null) { provider = DefaultLogFormatProvider.Instance; } _provider = provider; }
public LineBuffer(ITextWriter writer, ISafeConsole console) { _writer = writer; _console = console; }