This repository has been archived by the owner on May 1, 2024. It is now read-only.
Anonymous MessageCenter messages aren't heard anymore #5809
Labels
i/low
Has trivial workaround; affects very few users
i/regression
s/needs-repro ❔
This reported issue doesn't include a sample project reproducing the issue. Please provide one.
s/unverified
New report that has yet to be verified
t/bug 🐛
Description
Generally a MessageCenter message subscription it for a message sent from a specific class.
But it can also be anonymous in the sense that any class can
.Send
a message and any class will hear it.For example:
Subscribe:
MessagingCenter.Subscribe<string>(this,"ISENGINEON",OnEngineOnChanged);//Subscribe without caring who is sending the message.
Send:
MessagingCenter.Send("ISENGINEON", true.ToString());//Shared layer view models subscribe and react
You see it discussed with successful results back in Jan of 2018
https://stackoverflow.com/questions/48047444/xamarin-android-how-do-i-pass-an-event-from-mainactivity-to-viewmodel-on-forms
Yet... Now, it seem to no longer work. I'm testing in VS2019 with both 3.6.x stable and 4.0-pre
The subscribe takes place... the send takes place... The subscriber however never hears the message and thus never executes the handler method.
Steps to Reproduce
Expected Behavior
When you click the button the message is sent - That is confirmed with breakpoints.
The subscriber should then run the assigned handler.
Actual Behavior
The handler is never executed. Indicating the subscriber never hears the message.
Basic Information
Screenshots
Reproduction Link
The text was updated successfully, but these errors were encountered: