public static async Task <(string StdOut, string StdError)> withTimeout2(FormattableString command, TimeSpan timeSpan) { using (var cts = new CancellationTokenSource(timeSpan)) { return(await ProcessStartAsync(EscapeFormattableString.Escape(command), cts.Token)); } }
public static async Task <string> withTimeout(FormattableString command, int seconds) { using (var cts = new CancellationTokenSource(TimeSpan.FromSeconds(seconds))) { return((await ProcessStartAsync(EscapeFormattableString.Escape(command), cts.Token)).StdOut); } }
public static string escape(FormattableString command) { return(EscapeFormattableString.Escape(command)); }
public static Task <(string[] StdOut, string[] StdError)> runl2(FormattableString command, CancellationToken cancellationToken = default) { return(processl2(EscapeFormattableString.Escape(command), cancellationToken)); }
public static Task <string[]> runl(FormattableString command, CancellationToken cancellationToken = default) { return(processl(EscapeFormattableString.Escape(command), cancellationToken)); }
public static async Task <(string StdOut, string StdError)> withCancellation2(FormattableString command, CancellationToken cancellationToken) { return(await ProcessStartAsync(EscapeFormattableString.Escape(command), cancellationToken)); }
public static async Task <string> withCancellation(FormattableString command, CancellationToken cancellationToken) { return((await ProcessStartAsync(EscapeFormattableString.Escape(command), cancellationToken)).StdOut); }