Exemple #1
0
        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 });
        }
Exemple #2
0
        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 });
        }