Beispiel #1
0
        private void PushOne(Document document, object writer)
        {
            if (document.WriterExists(writer) == true)
            {
                document.RemoveWriter(writer);

                if (document.Writers.Count == 0)
                {
                    document.ReleaseLock();
                    if (document.IsGlobal == false)
                    {
                        this.m_Documents.Remove(document);
                    }

                    if (document.Value is YellowstonePathology.Business.Test.AccessionOrder)
                    {
                        Business.Test.AccessionOrder accessionOrder = (Business.Test.AccessionOrder)document.Value;
                        ISubscriber subscriber = Business.RedisConnection.Instance.GetSubscriber();
                        subscriber.Unsubscribe(accessionOrder.MasterAccessionNo);
                    }
                }
            }
            document.Submit();
        }
Beispiel #2
0
        private void PushOne(Document document, object writer)
        {
            if (document.WriterExists(writer) == true)
            {
                document.RemoveWriter(writer);

                if (document.Writers.Count == 0)
                {
                    if(document.IsLockAquiredByMe == true)
                    {
                        document.ReleaseLock();
                    }

                    if (document.IsGlobal == false)
                    {
                        this.m_Documents.Remove(document);
                    }
                }
            }
            document.Submit();
        }
Beispiel #3
0
 private void HandleAccessionLock(Document document)
 {
     if (document.Value is YellowstonePathology.Business.Test.AccessionOrder)
     {
         Business.Test.AccessionOrder accessionOrder = (Business.Test.AccessionOrder)document.Value;
         document.IsLockAquiredByMe = accessionOrder.AccessionLock.IsLockAquiredByMe;
         this.SubscribeToChannel(accessionOrder);
         accessionOrder.AccessionLock.RefreshLock();
     }
 }