Meditiator Register with 0 Parameters

Jun 14, 2010 at 10:54 AM

[ImportingConstructor]
        public SelectedUserViewModel(IMediator mediator)
        {
            this.mediator = mediator;
            this.mediator.Register(this);
        }

 [MediatorMessageSink("TEST")]
        public void TEst()
        {
        }

is not implemented yet? would be nice to see this in mefedmvvm ;) i use the code below.
Type parameterType = (parameters == null || parameters.Length == 0)
                                         ? null
                                         : parameters[0].ParameterType;

_invocationList.AddAction(attribute.Message, target, methodInfo, attribute.ParameterType);
mfg frank

 

 

Coordinator
Jun 14, 2010 at 11:11 AM
This is something I will be fixing some time soon.... thanks for reporting it...

Regards
Marlon
WPF Blog - http://marlongrech.wordpress.com/
Microsoft MVP for Client App



On Mon, Jun 14, 2010 at 10:54 AM, blindmeis <notifications@codeplex.com> wrote:

From: blindmeis

[ImportingConstructor]
        public SelectedUserViewModel(IMediator mediator)
        {
            this.mediator = mediator;
            this.mediator.Register(this);
        }

 [MediatorMessageSink("TEST")]
        public void TEst()
        {
        }

is not implemented yet? would be nice to see this in mefedmvvm ;) i use the code below.
Type parameterType = (parameters == null || parameters.Length == 0)
                                         ? null
                                         : parameters[0].ParameterType;

_invocationList.AddAction(attribute.Message, target, methodInfo, attribute.ParameterType);
mfg frank

 

 

Read the full discussion online.

To add a post to this discussion, reply to this email (MEFedMVVM@discussions.codeplex.com)

To start a new discussion for this project, email MEFedMVVM@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Jun 15, 2010 at 12:17 AM

Hi,

I have one Main Window and in the code-behind I import UserControls (separated projects) and add these to correct ItemsControl. Everything is working fine. In one of the UserControl I have a button that sends a Mediator message like this:

_mediator.NotifyColleagues("Test", "This is a test!");

 

In the other UserControl I have added this:

[MediatorMessageSink("Test", ParameterType = typeof(string))]        

public void OnDrawingFormatsArrived(string testMessage)      

{

            var tt = testMessage;      

 }

 

In each UserControl I have done like this:

this._mediator = mediator;

this._mediator.Register(this);

 

Should this work? I can't get it work.

Jun 15, 2010 at 12:26 AM

Sorry, I got it working.