title: Is there a way to refactor this event handling code in C#
body: <p>I'm trying to refactor some code that looks like this (there are several other cases).</p>
  
  <pre><code>switch (input) {
      case "1":
           _service.getWCFStuff1Completed += new EventHandler&lt;getWCFStuff1CompletedEventArgs&gt;(method1);
           _service.getWCFStuff1Async(strSomething);
      case "2":
           _service.getWCFStuff2Completed += new EventHandler&lt;getWCFStuff2CompletedEventArgs&gt;(method2);
           _service.getWCFStuff2Async(strSomething);
      [etc...]
  }
  </code></pre>
  
  <p>I'd like to change the code to something like this but I don't see any way to get a templated type (i.e. the EventArgs event handler) into an Action.</p>
  
  <pre><code>var Map = new Dictionary&lt;string, Action&lt;???, string&gt;&gt; {
      { "1", method1},
      { "2", method2}
  };
  </code></pre>
  
  <p>Is there any way to do this, or another approach in which I can use a Dictionary and be able to write code something like:</p>
  
  <pre><code>Map[input](something-with-eventargs, strSomething);
  </code></pre>