views:

30

answers:

1

Hello,

what I do not like about the Messenger I use (mvvm light toolkit) that when I register to DateTime and I send something other parts of my application get the datatime data too because they registered to "DateTime" type.

To prevent that I have to create always custom objects and wrap my datetime value. Thats stupi.

How do you workaround that problem?

+1  A: 

Sending messages of type DateTime seems like a bad idea to me... It's not specific enough, it doesn't carry any meaning.

Imagine you receive a letter that just contains a date, and nothing else: what would you make of it ? Is it a birthday, the release date of a movie, the deadline for paying your phone bill?

A date (or string, or int, or any primitive type) means nothing without context. You need to create specific message types, it's the only way the information you send can be meaningful.

Thomas Levesque
Ok Thomas this is what I have tought. So do you create a new extra class with one datetime property for every new datetime you send?
Lisa