I hate every time I am working on something and I have to implement INotifyPropertyChanged. My DRY-dey sense tingles*.* Not only am I forced to not use auto-properties (1st DRY violation), I’m forced to fire the event in each setter (2nd DRY violation), and specify the name of the property that is getting set, inside […]
This week I ran into wanting to use C# 4.0 optional parameters, but wanted StructureMap (my IoC tool of choice) to respect the default value specified for those optional parameters. The Problem In this example, we’ll be pulling a command out of the container. The important part is the optional constructor parameter (level), and it’s […]
In my few days of being a developer, I’ve heard and seen lots of talk about Singletons. Things like Singletons are teh suck. Don’t use them. EVAR. to Singleton’s saved my life and marriage! In fact, I might’ve been the person that said both of these… gasp! I never like to speak in absolutes, so […]