This project is read-only.
1

Closed

Mediator in ViewModelBase better be static.

description

in ViewModelBase.
 
    public Mediator Mediator
    {
        get { return mediator; }
    }
 
better be
    public static Mediator Mediator
    {
        get { return mediator; }
    }
 
then other class than can use it.
Closed Nov 27, 2011 at 6:14 PM by sachabarber
Done

comments

sachabarber wrote May 2, 2010 at 7:38 AM

Faie enough, I will fix that soon

sachabarber wrote May 4, 2010 at 9:26 AM

That is now done, and there is also a Mediator singleton that you can use anywhere like Mediator.Instance.NotifyCollegues.......

cibrax wrote Sep 9, 2010 at 7:45 PM

One problem I see with this Mediator class is that you can not easily verify in an unit test that the Mediator was called to notifyColleagues, as it can not be mocked. You can still test it, but it requires creating a new class with the attribute MediatorMessageSinkAttribute just to check weather the class I am testing fired a new notification. It would be great to have either way to mock this class or get access to an internal queue with all the fired events.

wrote Jan 1, 2011 at 11:50 AM

wrote Nov 27, 2011 at 6:14 PM

wrote Feb 22, 2013 at 12:07 AM

wrote May 16, 2013 at 11:46 AM