Messaging Bus question

Oct 4, 2013 at 6:28 PM
Edited Oct 4, 2013 at 6:29 PM
I am writing a Silverlight application. I am trying to send messages from a ViewModel in a DLL I am loading dynamically at run time. But, the listeners I have set up in ViewModels that are part of the main project don't seem to be receiving the messages sent from the dynamically loaded DLL.

Am I missing something or is this not possible?

Kevin Faulkner
Oct 5, 2013 at 11:29 AM
Can you post your code or some snippets to see how you are approaching this?
Oct 7, 2013 at 12:50 PM
This is how it is being sent from within the external DLL
    private void NotifyIsAvailable(SSRSPostInformation info)
        this.SendMessage(MessageTokens.SetIsAvailable, new NotificationEventArgs<SSRSPostInformation>(null, info));
This is the code I am using to listen within the main application
   this.RegisterToReceiveMessages<SSRSPostInformation>(MessageTokens.SetIsAvailable, this.OnSetIsAvailable);

   private void OnSetIsAvailable(object sender, NotificationEventArgs<SSRSPostInformation> e)
        this.ssrsURL = e.Data;
        this.IsAvailable = !string.IsNullOrEmpty(this.ssrsURL.Action.Trim());
This all seems to work fine when everything is within the same application. It only became a problem when I removed parts and put them in a separate DLL.
Oct 7, 2013 at 5:00 PM
Both assemblies reference the toolkit, and both sender and receiver derive from ViewModelBase?
Oct 7, 2013 at 5:36 PM
Edited Oct 7, 2013 at 5:37 PM
They both derive from ViewModelDetailBase.
Oct 7, 2013 at 6:32 PM
Should work ... Let me try putting together a demo. Cheers, Tony
Oct 7, 2013 at 7:11 PM
I figured out my issue. It was a type issue with the value I was sending back and forth.