Source/Csla/Threading/BusyLock.cs
/// <summary>
/// Waits for the target object to become not busy.
/// </summary>
Waits for the target object to become not busy.
Waits for the target object to become not busy .
public void WaitOne()
    {
      try
      {
        _target.BusyChanged += new BusyChangedEventHandler(notify_BusyChanged);
        if (_target.IsBusy)
        {
#if (ANDROID || IOS)
          _event.WaitOne(_timeout);
#else
          _event.WaitOne(_timeout, false);
#endif
        }
      }
      finally
      {
        _target.BusyChanged -= new BusyChangedEventHandler(notify_BusyChanged);
        _event.Close();
      }
    }
public void WaitOne ( ) { try { _target . BusyChanged += new BusyChangedEventHandler ( notify_BusyChanged ) ; if ( _target . IsBusy ) { if ( ANDROID || IOS ) _event . WaitOne ( _timeout ) ; else _event . WaitOne ( _timeout , false ) ; endif } } finally { _target . BusyChanged -= new BusyChangedEventHandler ( notify_BusyChanged ) ; _event . Close ( ) ; } }
Waits for the target object to become not busy.
Waits for the target object to become not busy .
// Do nothing if this object is not currently busy // otherwise wait for the event to be signaled.