The delayed first E-VAN is on now with Greg Young, discussing DDD and CQS. The URL is: http://snipr.com/virtualaltnet (Live Meeting).
NOTE: This one was a success and Greg did a superb job explaining DDD and messaging, really enjoyable stuff.
Post Footer automatically generated by Add Post Footer Plugin for wordpress.

DDD
Colin,
At about minute 64 in the video you asked the question of how to apply the specification pattern on a domain object that doesn’t expose its state (no getters/setters).
Greg answered and said that there wasn’t a really good way to do it because of technical limitations with C# and then he proposed marking certain properties as internal (instead of private) and using NDepend or some other mechanism.
What we do instead is to have an interface–typically one with an “internal” accessibility modifier. Then, we have the domain object implement this interface explicitly rather than implicitly, e.g.:
string IMyInternalInterface.FirstName { get; }
rather than:
public string FirstName { get; }
Then, you simply have your specification use IMyInternalInterface.
Granted, there’s a little bit of casting involved, but covariance in C# 4 should address the casting issues.