Example #1
0
            public override void Handle(object param)
            {
                IpcSendServiceParam serviceParam = (IpcSendServiceParam)param;

                var    propertyName = serviceParam.Data.ToString();
                object cachedObject;

                if (mMemoryCache.TryGetValue(propertyName, out cachedObject))
                {
                    var    ipcMessage = new IpcMessage();
                    object obj        = new {
                        PropertyName = propertyName,
                        Value        = JsonConvert.SerializeObject(cachedObject)
                    };

                    ipcMessage.Body = JsonConvert.SerializeObject(obj, Formatting.Indented);
                    this.mLogger.Debug("UpdateProp 送信本文={0}", ipcMessage.Body);

                    mIpcMessageBridge.Send("IPC_UPDATEPROP", ipcMessage);
                }
                else
                {
                    this.mLogger.Warn("[Execute] Faile MemCache");
                }
            }
            public override void Handle(object param)
            {
                IpcSendServiceParam serviceParam = (IpcSendServiceParam)param;

                var messageparameter = serviceParam.Data as UpdateViewResponse;

                var    ipcMessage = new IpcMessage();
                object obj        = new {
                    UpdateList     = messageparameter.ViewEventList,
                    Parameter      = messageparameter.Parameter,
                    NextScreenName = messageparameter.NextScreenName
                };

                ipcMessage.Body = JsonConvert.SerializeObject(obj, Formatting.Indented);
                mLogger.Info("Body(JSON)=" + ipcMessage.Body);

                mIpcMessageBridge.Send("IPC_UPDATEVIEW", ipcMessage);
            }