public class Foo<T> where T: Entity
{}
public class Foo1
: Foo<Telephone>
{
}
public class Foo2
: Foo<Home>
{
}
How do I send Foo1 to Foo2? I realize that the message is typed, and hence messages of the same type of recieved – but I need to message between the derived classes…
An example would be very much appreciated.
the messaging in mvvmlight is in theory supposed to be fire and forget…the sender doesnt care who gets the message and the receiver doesnt care who sends the message, so long as its the right type that its listening for.
I have found through much trial and error that its much easier to craft your own messages than use the default provided by mvvm-light, they are a good starting point, but sometimes you will just findyourself jumping through hoops..
Receiver code:
Sender Code:
and yes this does break the suggestion in my first sentence, but in theory I could have several vms or view listening for exception messages.
Maybe another example to help you out… i hate the whole foo thing…its always confuses me…
This is in my core module:
here is how I used it in my vm: