On Mon, Jan 24, 2011 at 11:38 PM, David Rhys Jones <djones...@gmail.com> wrote: > > Hi all, > > Background: > > I've got a service connection that is limited to 5 logins, (internal app > written in another dept, Java Webservice not WCF compatible.), I've > implemented a library (C# 3.5) that calls this and a number of different > services to provide a coherent data source for our Excel (2003) > applications. > In my dispose, I clean everything up correctly, connections are closed, > webservice is disposed etc. > > Problem: > > I need to find a way to force the developpers in my team and in the other > teams that use my library to call the Dispose method after each use of the > library.
Yeah, I tend to agree with Michael, I think your design is slightly wrong. It doesn't look correct to be disposing a member variable. (What happens if it is re-called?) I don't know if this is a function of Spring.Net though; I've never used it. I think, anyway, that you shouldn't even need to force them to do the dispose. You can just do it, in some base class upwards, no, in the implementation of GetPrices? > thanks > Davy, > > > "Always code as if the guy who ends up maintaining your code will be a > violent psychopath who knows where you live." > - Martin Golding -- Noon Silk http://dnoondt.wordpress.com/ (Noon Silk) | http://www.mirios.com.au:8081 > "Every morning when I wake up, I experience an exquisite joy — the joy of being this signature."