public override void Visit(TypeAttributes access, String name, Type superName, Type[] interfaces)
        {
            Type originalType = State.OriginalType;

            access &= ~TypeAttributes.Abstract;
            access &= ~TypeAttributes.Interface;
            if (originalType.IsInterface)
            {
                CHashSet <Type> interfaceSet = new CHashSet <Type>(interfaces);
                interfaceSet.Add(originalType);
                interfaces = interfaceSet.ToArray();
            }
            base.Visit(access, name, superName, interfaces);
        }
Exemple #2
0
        public PrefetchPath CopyAppendableToCachePath(AppendableCachePath cachePath)
        {
            PrefetchPath[] clonedChildren = CopyAppendableToCachePath(cachePath.children);
            if (clonedChildren == null)
            {
                return(new PrefetchPath(cachePath.memberType, cachePath.memberIndex, cachePath.memberName, clonedChildren, new Type[0]));
            }
            CHashSet <Type> memberTypesOnDescendants = new CHashSet <Type>();

            foreach (PrefetchPath clonedChild in clonedChildren)
            {
                memberTypesOnDescendants.Add(clonedChild.memberType);
                memberTypesOnDescendants.AddAll(clonedChild.memberTypesOnDescendants);
            }
            return(new PrefetchPath(cachePath.memberType, cachePath.memberIndex, cachePath.memberName, clonedChildren,
                                    memberTypesOnDescendants.ToArray()));
        }
Exemple #3
0
        public ISet <IObjRef> lookForIntermediateDeletes()
        {
            CHashSet <IObjRef> intermediateDeletes = new CHashSet <IObjRef>();
            // Hold cache values as hard ref to prohibit cache loss due to GC
            IList <IObjRef> hardRefRequest = hardRefObjRefsToLoad.ToList();
            IList <Object>  hardRefResult  = rootCache.GetObjects(hardRefRequest, cacheValueResultAndReturnMissesSet);

            for (int a = hardRefResult.Count; a-- > 0;)
            {
                Object hardRef = hardRefResult[a];
                if (hardRef != null)
                {
                    continue;
                }
                // Objects are marked as UPDATED in the DCE, but could not be newly retrieved from the server
                // This occurs if a fast DELETE event on the server happened but has not been processed, yet
                IObjRef hardRefObjRefToLoad = hardRefRequest[a];
                intermediateDeletes.Add(hardRefObjRefToLoad);
            }
            this.privilegedHardRefResult = hardRefResult;
            RemoveNotFoundObjRefs(intermediateDeletes.ToArray());

            return(intermediateDeletes);
        }