void OnReceiveModuleMessage(object sender, MessageEventArgs e) { System.Diagnostics.Debug.WriteLine("{0} {1} {2}", e.Sender, e.To, e.Data); var toModule = Container.Get(e.To); var fromModule = Container.Get(e.Sender); var toInvoke = BaseMessenger <IModuleService> .ResolveMessageMethod(e, "OnMessage"); toInvoke?.Invoke(toModule, new object [] { fromModule, e.Data }); }
void OnReceiveModuleRequest(object sender, RequestEventArgs e) { System.Diagnostics.Debug.WriteLine("{0} {1} {2}", e.Sender, e.From, e.Data); var fromModule = Container.Get(e.From); var senderModule = Container.Get(e.Sender); var toInvoke = BaseMessenger <IModuleService> .ResolveRequestMethod(e, "OnRequest"); toInvoke?.Invoke(fromModule, new object[] { senderModule, e }); }