コード例 #1
0
 /// <summary>
 /// Attention this does not cancel the original Task!!!!
 /// </summary>
 /// <param name="thisValue"></param>
 /// <param name="timeSpan"></param>
 /// <returns></returns>
 public static Task WithCancellation(this Task thisValue, TimeSpan timeSpan)
 => WithCancellation(thisValue, timeSpan.AsToken());
コード例 #2
0
 public Task <bool> WaitAsync(TimeSpan timeSpan)
 => WaitAsync(timeSpan.AsToken());
コード例 #3
0
 /// <summary>
 /// Attention this does not cancel the original Task!!!!
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="task"></param>
 /// <param name="timeSpan"></param>
 /// <returns></returns>
 public static Task <T> WithCancellation <T>(this Task <T> task, TimeSpan timeSpan)
 => WithCancellation(task, timeSpan.AsToken());