C#C
C#2y ago
ChaChaCha

MVVM toolkit receive method of messaging service

Hi guys was wondering if there is a convention for using messaging service?
implementing the irecipient of the message makes a Receive method to execute when the message is received (duh) but if there are many receive methods its quite ambiguous

is there a way around this? can i put receive methods at the bottom of the class file that pass and call an aptly named method that is higher up for more code readability? would this effect performance and memory?

an example would be

something like

public class Foo: IRecipient<BarMessage>

{

public void Receive(BarMessage message) => private void DoBarMessage(message);

}
Was this page helpful?