예제 #1
0
파일: Env.cs 프로젝트: Cysharp/ProcessX
 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));
     }
 }
예제 #2
0
파일: Env.cs 프로젝트: Cysharp/ProcessX
 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);
     }
 }
예제 #3
0
파일: Env.cs 프로젝트: Cysharp/ProcessX
 public static string escape(FormattableString command)
 {
     return(EscapeFormattableString.Escape(command));
 }
예제 #4
0
파일: Env.cs 프로젝트: Cysharp/ProcessX
 public static Task <(string[] StdOut, string[] StdError)> runl2(FormattableString command, CancellationToken cancellationToken = default)
 {
     return(processl2(EscapeFormattableString.Escape(command), cancellationToken));
 }
예제 #5
0
파일: Env.cs 프로젝트: Cysharp/ProcessX
 public static Task <string[]> runl(FormattableString command, CancellationToken cancellationToken = default)
 {
     return(processl(EscapeFormattableString.Escape(command), cancellationToken));
 }
예제 #6
0
파일: Env.cs 프로젝트: Cysharp/ProcessX
 public static async Task <(string StdOut, string StdError)> withCancellation2(FormattableString command, CancellationToken cancellationToken)
 {
     return(await ProcessStartAsync(EscapeFormattableString.Escape(command), cancellationToken));
 }
예제 #7
0
파일: Env.cs 프로젝트: Cysharp/ProcessX
 public static async Task <string> withCancellation(FormattableString command, CancellationToken cancellationToken)
 {
     return((await ProcessStartAsync(EscapeFormattableString.Escape(command), cancellationToken)).StdOut);
 }