Skip to main content

You could also use a DynamicProxy to extend the Dispose() method. This way you could do something like:

using (var wrapperdProxy = new Proxy<yourProxy>()) { // Do whatever and dispose of Proxy<yourProxy> will be called and work properly. } 
Uri Abramson
  • 6.2k
  • 6
  • 44
  • 65