Esempio n. 1
0
 /// <summary>
 /// Raises the <see cref="Changed"/> event.
 /// </summary>
 /// <param name="e">The <see cref="WatcherEventArgs"/> instance containing the event data.</param>
 protected virtual void OnChangedRaised(WatcherEventArgs e)
 {
     if (TimerPostponing != null)
     {
         return;
     }                                        // we already have a postponed signaling
     if (DueTimeOnChanged != TimeSpan.Zero)
     {
         TimerPostponing = new Timer(PostponedHandleSignaling, e, DueTimeOnChanged, TimeSpan.FromMilliseconds(-1));
         return;
     }
     OnChangedRaisedCore(e);
 }
Esempio n. 2
0
        private void OnChangedRaisedCore(WatcherEventArgs e)
        {
            EventHandler <WatcherEventArgs> handler = Changed;

            EventUtility.Raise(handler, this, e);
        }