Creating a Messenger service
问题 To help reduce dependencies between my ViewModels, I am trying to create my own Messenger service. Here is some code: public struct Subscription { public Type Type { get; set; } public string Message { get; set; } //Error: Cannot implicitly convert type 'System.Action<TPayload>' to 'System.Action' public Action Callback { get; set; } } public static class Messenger { private static List<Subscription> Subscribers { get; set; } static Messenger() { Subscribers = new List<Subscription>(); }