title: How do I add attributes to a method at runtime?
body: <p>We're using Microsoft.Practices.CompositeUI.EventBroker to handle event subscription and publication in our application.  The way that works is that you add an attribute to your event, specifying a topic name, like this:</p>
  
  <pre><code>[EventPublication("example", PublicationScope.Global)]
  public event EventHandler Example;
  </code></pre>
  
  <p>then you add another attribute to your handler, with the same topic name, like this:</p>
  
  <pre><code>[EventSubscription("example", ThreadOption.Publisher)]
  public void OnExample(object sender, EventArgs e)
  {
      ...
  }
  </code></pre>
  
  <p>Then you pass your objects to an EventInspector which matches everything up.</p>
  
  <p>We need to debug this, so we're trying to create a debug class that subscribes to <em>all</em> the events.  I can get a list of all the topic names... but only at runtime.  So I need to be able to add attributes to a method at runtime, before we pass our debug object to the EventInspector.</p>
  
  <p>How do I add attributes to a method at runtime?</p>