Esempio n. 1
0
 public static bool WaitOne(WaitHandle waitHandle, TimeSpan timeout)
 {
     TimeoutHelper.ThrowIfNegativeArgument(timeout);
     if (timeout != TimeSpan.MaxValue)
     {
         return(waitHandle.WaitOne(timeout, false));
     }
     else
     {
         waitHandle.WaitOne();
         return(true);
     }
 }
 public IOThreadCancellationTokenSource(TimeSpan timeout)
 {
     TimeoutHelper.ThrowIfNegativeArgument(timeout);
     this.timeout = timeout;
 }
Esempio n. 3
0
 public static void ThrowIfNegativeArgument(TimeSpan timeout)
 {
     TimeoutHelper.ThrowIfNegativeArgument(timeout, "timeout");
 }