2

Does anyone have an IsDirty implementation they find particularly useful? Ideally I'd like to support Undo but not have to lug a framework like CSLA in. I'd also prefer an implementation that favors composition over inheritance.

I'm working with WPF with a ViewModel slant right now (INotifyPropertyChanged). The last SO question I've seen is a bit old and doesn't fully address what I'm asking in this one.

Cheers,
Berryl

======= Other Good SO Answers to IsDirty checking =======

I found these after I posted and answered this, here and here

Community
  • 1
  • 1
Berryl
  • 12,471
  • 22
  • 98
  • 182

2 Answers2

2

Here is an implementation.

Hope it helps!

Tony The Lion
  • 61,704
  • 67
  • 242
  • 415
  • I had seen this and maybe this is about as good as it gets, but it relies on both inheritance and additional noise in the Property setters. Have you been using this? – Berryl Feb 11 '10 at 22:54
  • I played with this a bit. It's actually a nicer simple implementation that I had thought. Thanks! – Berryl Feb 12 '10 at 04:08
1

You may want to check out the Caffeine View Model Framework. It provides built in answers to common problems, such as IsDirty and IsInvalid implementations. Here's the link http://caffeine.codeplex.com/

RSG
  • 11
  • 2