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 […]