public async Task Should_Excute_Multiple_Command() { using (var client = new TerminalClient(_trace)) { var exitCode = await client.ExcuteAsync(@"C:\", "cmd.exe", "/c git --version"); exitCode = await client.ExcuteAsync(@"C:\Repos", "cmd.exe", "/c dir"); Assert.Equal(0, exitCode); } }
public async Task Should_Excute_Long_Command() { using (var client = new TerminalClient(_trace)) { var exitCode = await client.ExcuteAsync(@"C:\", "cmd.exe", null); Assert.Equal(0, exitCode); } }
static async Task Main(string[] args) { using (var client = new TerminalClient(_trace)) { client.OnOutput += OnOutput; await client.ExcuteAsync("/etc", "ifconfig", null); } }
static async Task Main(string[] args) { using (var client = new TerminalClient(_trace)) { var workingDir = @"C:\"; var fileName = "cmd.exe"; var cmd = "/c dir"; client.OnOutput += OnOutput; await client.ExcuteAsync(workingDir, fileName, cmd); } }