While disposition stuff is on the brain, there’s another disposition topic I’ve been wanting to write about for a while now: handling disposition of objects of nebulous ownership. The issue of nebulous ownership creeps in whenever you use any sort of complex creational pattern. If you instantiate an object by invoking its constructor directly, it’s pretty clear that you are its owner (unless, of course, you’re deliberately handing it off to other code). If that object happens to be disposable, then you can (and should) safely dispose it when you’re done working with it. But what if you obtained an … Continue reading IMightBeDisposable

Introducing the Bordecal tools for FxCop

I’ve had publication of a little FxCop rule-building toolkit on my todo list for at least the past three years. I finally got the beastie out the door yesterday evening… The Bordecal tools for FxCop include two main pieces: A rule development framework with two main pieces: A testing framework for custom rules, and Rule base classes that allow configuration via code rather than an embedded XML file. A set of custom rules. The testing framework is probably the single most important part. For those of you who are already familiar with Roy Osherove’s FxCopUnit, it is important to understand … Continue reading Introducing the Bordecal tools for FxCop