Taming the Chaos: Controlling Resource Access in .NET