title: Unsign all event listeners, C# code example
body: <p>I have a C# class which introduce a new custom event type, and allows users add or remove listeners to it. Also I implement a method which revoves all event listeners during dispatch;</p>
  
  <pre><code>    public event EventHandler DataCommited;
  
      private void DetatchListeners()
      {
          if (DataCommited != null)
          {
              foreach (EventHandler eh in DataCommited.GetInvocationList())
              {
                  DataCommited -= eh;
              }
          }
      }
  </code></pre>
  
  <p>It is possible to implement a method which will be taking DataCommited event as an argument. So, I can unsign a set of events using one method. I tried a lot ways implementing it, but unfortunately failed to do it. I wonder if it is actually possible and how. Thank you!!!</p>