예제 #1
0
파일: Stack.cs 프로젝트: ericramses/YPILIS
        public void SubscribeToChannel(Business.Test.AccessionOrder accessionOrder)
        {
            Store.RedisServerProd1.Instance.Subscriber.Subscribe(accessionOrder.MasterAccessionNo, (channel, message) =>
            {
                System.Windows.Application.Current.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Input, new System.Threading.ThreadStart(delegate()
                {
                    UI.AppMessaging.AccessionLockMessage accessionLockMessage = JsonConvert.DeserializeObject <UI.AppMessaging.AccessionLockMessage>(message);

                    if (accessionLockMessage.ToMachineName == System.Environment.MachineName)
                    {
                        if (accessionLockMessage.MessageId == UI.AppMessaging.AccessionLockMessageIdEnum.GIVE)
                        {
                            accessionOrder.AccessionLock.RefreshLock();
                            YellowstonePathology.Business.Persistence.DocumentGateway.Instance.RefreshAccessionOrder(accessionLockMessage.MasterAccessionNo);
                        }
                        UI.AppMessaging.MessagingPath.Instance.HandleMessageReceived(accessionLockMessage, accessionOrder);
                    }
                }
                                                                                                                                                         ));
            });
        }
예제 #2
0
 public AccessionLockMessageReturnEventArgs(UI.AppMessaging.AccessionLockMessage message)
 {
     this.m_Message = message;
 }
 public AOAccessionLockMessageReturnEventArgs(Business.Test.AccessionOrder accessionOrder, UI.AppMessaging.AccessionLockMessage message)
 {
     this.m_AccessionOrder = accessionOrder;
     this.m_Message = message;
 }
 public AccessionLockMessageReturnEventArgs(UI.AppMessaging.AccessionLockMessage message)
 {
     this.m_Message = message;
 }
 public AOAccessionLockMessageReturnEventArgs(Business.Test.AccessionOrder accessionOrder, UI.AppMessaging.AccessionLockMessage message)
 {
     this.m_AccessionOrder = accessionOrder;
     this.m_Message        = message;
 }