title: Generic WeakReference proxy
body: <p>I want to create custom <code>WeakReference&lt;T&gt;</code> which would implement an interface passed as generic parameter <code>T</code>.</p>
  
  <p>Usage:</p>
  
  <pre><code>interface IInterface
  {
      void SomeMethod(bool param);
  }
  
  public class Subject : IInterface { /*...*/ }
  
  var proxyRef = new ProxyWeakReference&lt;IInterface&gt;(new Subject());
  proxyRef.SomeMethod(false);
  IInterface subject = proxyRef.Target;
  </code></pre>
  
  <p>Is there any already created solutions to do that? Or what i should use to create such type of proxy?</p>