Example #1
0
        protected void DataChanged(IDataChange dataChange, Object eventTarget, IList <Object> pausedEventTargets, DateTime dispatchTime, long sequenceId)
        {
            CacheDependencyNode rootNode = BuildCacheDependency();

            if (pausedEventTargets != null && pausedEventTargets.Count > 0)
            {
                IdentityHashSet <Object> collisionSet = BuildCollisionSet(rootNode);
                if (collisionSet.ContainsAny(pausedEventTargets))
                {
                    // Without the current rootcache we can not handle the event now. We have to block till the rootCache and all childCaches get valid
                    EventDispatcher.WaitEventToResume(collisionSet, -1, delegate(IProcessResumeItem processResumeItem)
                    {
                        DataChangedIntern(dataChange, pausedEventTargets, processResumeItem, rootNode);
                    }, null);
                    return;
                }
            }
            DataChangedIntern(dataChange, pausedEventTargets, null, rootNode);
        }