Posts Tagged ‘PostSharp’

Recently I wrote some code to integrate ValidationAspects with WPF so that validation could be applied to my domain models and the WPF UI would notify the user of any invalid values when they attempt to modify the model. It was surprisingly easy 🙂 ValidationAspects is an AOP validation framework used to validate Objects, Properties […]


While integrating ValidationAspects with WPF I wrote a PostSharp aspect that would weave INotifyPropertyChanged implementation into a class. Manually implementing INotifyPropertyChanged on a class is a pain and it’s easy to miss a property when adding code to fire the Property Changed event. The use of aspects here is a really good idea – with […]


OK, so not the snappiest title but hopefully it’s clear to you what I’m about to explain. No? A new feature went into v1.6.0 of ValidationAspects that enables you to register object validation against a method. This validation is then invoked prior to the method being invoked. It’s useful for scenarios such as when you […]


A little while ago I started work on a project using .net which had a non trivial requirement for Domain Models (Business Objects) to be validated. The level of validation to be applied to the model varied from simple code contracts (e.g. parameter is non null) to more complex business rules (e.g. customer has a […]