title: Can I use the decorator pattern to wrap a method body?
body: <p>I have a bunch of methods with varying signatures.  These methods interact with a fragile data connection, so we often use a helper class to perform retries/reconnects, etc.  Like so:</p>
  
  <pre><code>MyHelper.PerformCall( () =&gt; { doStuffWithData(parameters...) });
  </code></pre>
  
  <p>And this works fine, but it can make the code a little cluttery.  What I would prefer to do is decorate the methods that interact with the data connection like so:</p>
  
  <pre><code>[InteractsWithData]
  protected string doStuffWithData(parameters...)
  {
       // do stuff...
  }
  </code></pre>
  
  <p>And then essentially, whenever <code>doStuffWithData</code> is called, the body of that method would be passed in as an <code>Action</code> to <code>MyHelper.PerformCall()</code>.  How do I do this?</p>