Exemplo n.º 1
0
 // Wrap event invocations inside a protected virtual method
 protected virtual void OnProgressUpdateEventHandler(ProgressUpdateEventArgs e)
 {
     // Make a temporary copy of the event to avoid possibility of
     // a race condition if the last subscriber unsubscribes
     // immediately after the null check and before the event is raised.
     ProgressUpdateEventHandler?.Invoke(this, e);
 }
Exemplo n.º 2
0
 public void RegisterNotifier(ProgressUpdateEventHandler handler)
 {
     notifier.ProgressUpdate += handler;
 }