title: how to use a ContextBoundObject to intercept a function call before/after the invocation?
body: <p>I have read <a href="http://www.c-sharpcorner.com/UploadFile/shivprasadk/1111302072009051446AM/11113.aspx" rel="noreferrer">this article</a> and I can't find a good example for how to use a <code>ContextBoundObject</code> to intercept a function call.<br>
  Can anyone show me how it's done?  </p>
  
  <p>Also, a side question: Why can't I use a <code>ContextBoundObject</code> with a generic class? I am asking accroding to <a href="http://msdn.microsoft.com/en-us/library/system.contextboundobject.aspx" rel="noreferrer">this msdn reference</a></p>