Esempio n. 1
0
 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));
     }
 }
Esempio n. 2
0
 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);
     }
 }
Esempio n. 3
0
 public static string escape(FormattableString command)
 {
     return(EscapeFormattableString.Escape(command));
 }
Esempio n. 4
0
 public static Task <(string[] StdOut, string[] StdError)> runl2(FormattableString command, CancellationToken cancellationToken = default)
 {
     return(processl2(EscapeFormattableString.Escape(command), cancellationToken));
 }
Esempio n. 5
0
 public static Task <string[]> runl(FormattableString command, CancellationToken cancellationToken = default)
 {
     return(processl(EscapeFormattableString.Escape(command), cancellationToken));
 }
Esempio n. 6
0
 public static async Task <(string StdOut, string StdError)> withCancellation2(FormattableString command, CancellationToken cancellationToken)
 {
     return(await ProcessStartAsync(EscapeFormattableString.Escape(command), cancellationToken));
 }
Esempio n. 7
0
 public static async Task <string> withCancellation(FormattableString command, CancellationToken cancellationToken)
 {
     return((await ProcessStartAsync(EscapeFormattableString.Escape(command), cancellationToken)).StdOut);
 }