Пример #1
0
        internal void Realizing(OpenDocumentSensitivePrioritizedFuture openDocumentSensitivePrioritizedFuture)
        {
            Monitor.Enter(this);
            try
            {
                IFuture openDocumentFuture = openDocumentSensitivePrioritizedFuture.GetOpenDocumentFuture();
                if (openDocumentFuture != null)
                {
                    if (!docToFuturesDict.ContainsKey(openDocumentFuture))
                    {
                        docToFuturesDict[openDocumentFuture] = new ODSPFutureSet();
                    }

                    D.Assert(!docToFuturesDict[openDocumentFuture]
                             .ContainsKey(openDocumentSensitivePrioritizedFuture.identity));
                    docToFuturesDict[openDocumentFuture][openDocumentSensitivePrioritizedFuture.identity] =
                        openDocumentSensitivePrioritizedFuture;
                    openDocumentSensitivePrioritizedFuture.DocumentStateChanged(
                        openDocumentCache.Contains(openDocumentFuture));
                }
            }
            finally
            {
                Monitor.Exit(this);
            }
        }
 internal void Complete(OpenDocumentSensitivePrioritizedFuture openDocumentSensitivePrioritizedFuture)
 {
     Monitor.Enter(this);
     try
     {
         IFuture openDocumentFuture = openDocumentSensitivePrioritizedFuture.GetOpenDocumentFuture();
         if (openDocumentFuture != null)
         {
             bool condition = this.docToFuturesDict[openDocumentFuture].Remove(openDocumentSensitivePrioritizedFuture.identity);
             D.Assert(condition);
         }
     }
     finally
     {
         Monitor.Exit(this);
     }
 }