private void CopyDomainScopeGroupInstance(RuntimeGroupRootObj destination, ScalableDictionary <object, IReference <RuntimeHierarchyObj> > runtimeHierarchyObjRefs)
        {
            IReference <RuntimeHierarchyObj> reference = null;

            DomainScopeContext.DomainScopeInfo currentDomainScope = m_owner.OdpContext.DomainScopeContext.CurrentDomainScope;
            foreach (object key in runtimeHierarchyObjRefs.Keys)
            {
                currentDomainScope.AddKey(key);
                reference = runtimeHierarchyObjRefs[key];
                using (reference.PinValue())
                {
                    RuntimeHierarchyObj runtimeHierarchyObj = reference.Value();
                    if (runtimeHierarchyObj.HierarchyObjs == null)
                    {
                        RuntimeGroupingObjHash runtimeGroupingObjHash = (RuntimeGroupingObjHash)runtimeHierarchyObj.Grouping;
                        CopyDomainScopeGroupInstance(destination, runtimeGroupingObjHash.m_hashtable);
                    }
                    else
                    {
                        Global.Tracer.Assert(runtimeHierarchyObj.HierarchyObjs.Count == 1, "hierarchyObject.HierarchyObjs.Count == 1");
                        IReference <RuntimeHierarchyObj> reference2 = runtimeHierarchyObj.HierarchyObjs[0];
                        using (reference2.PinValue())
                        {
                            RuntimeDataTablixGroupLeafObj runtimeDataTablixGroupLeafObj = (RuntimeDataTablixGroupLeafObj)reference2.Value();
                            currentDomainScope.CurrentRow = runtimeDataTablixGroupLeafObj.FirstRow;
                            destination.NextRow();
                        }
                    }
                }
                currentDomainScope.RemoveKey();
            }
        }
        internal RuntimeGroupingObjHash(RuntimeHierarchyObj owner, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType)
            : base(owner, objectType)
        {
            OnDemandProcessingContext odpContext = owner.OdpContext;

            m_hashtable = new ScalableDictionary <object, IReference <RuntimeHierarchyObj> >(owner.Depth + 1, odpContext.TablixProcessingScalabilityCache, 101, 27, odpContext.ProcessingComparer);
        }
 internal override void Cleanup()
 {
     if (m_hashtable != null)
     {
         m_hashtable.Dispose();
         m_hashtable = null;
     }
     if (m_parentInfo != null)
     {
         m_parentInfo.Dispose();
         m_parentInfo = null;
     }
 }
Beispiel #4
0
 public override void Cleanup()
 {
     if (this.m_hashtable != null)
     {
         this.m_hashtable.Dispose();
         this.m_hashtable = null;
     }
     if (this.m_parentInfo != null)
     {
         this.m_parentInfo.Dispose();
         this.m_parentInfo = null;
     }
 }
Beispiel #5
0
 public void Deserialize(IntermediateFormatReader reader)
 {
     reader.RegisterDeclaration(LookupTable.m_Declaration);
     while (reader.NextMember())
     {
         MemberName memberName = reader.CurrentMember.MemberName;
         if (memberName == MemberName.LookupTable)
         {
             this.m_table = reader.ReadRIFObject <ScalableDictionary <object, LookupMatches> >();
         }
         else
         {
             Global.Tracer.Assert(false);
         }
     }
 }
Beispiel #6
0
 private void ProcessParent(object parentKey, IReference <RuntimeGroupLeafObj> parentObj, RuntimeGroupLeafObjReference childObj, bool addToWaitList)
 {
     if (parentObj != null)
     {
         using (parentObj.PinValue())
         {
             parentObj.Value().AddChild(childObj);
         }
     }
     else
     {
         RuntimeGroupRootObj runtimeGroupRootObj = base.m_owner as RuntimeGroupRootObj;
         runtimeGroupRootObj.AddChild(childObj);
         if (addToWaitList)
         {
             ChildLeafInfo childLeafInfo = null;
             IDisposable   disposable2   = null;
             try
             {
                 if (this.m_parentInfo == null)
                 {
                     this.m_parentInfo = this.CreateParentInfo();
                 }
                 else
                 {
                     this.m_parentInfo.TryGetAndPin(parentKey, out childLeafInfo, out disposable2);
                 }
                 if (childLeafInfo == null)
                 {
                     childLeafInfo = new ChildLeafInfo();
                     disposable2   = this.m_parentInfo.AddAndPin(parentKey, childLeafInfo);
                 }
                 childLeafInfo.Add(childObj);
             }
             finally
             {
                 if (disposable2 != null)
                 {
                     disposable2.Dispose();
                 }
             }
         }
     }
 }
        private void ProcessParent(object parentKey, IReference <RuntimeGroupLeafObj> parentObj, RuntimeGroupLeafObjReference childObj, bool addToWaitList)
        {
            if (parentObj != null)
            {
                using (parentObj.PinValue())
                {
                    parentObj.Value().AddChild(childObj);
                }
                return;
            }
            (m_owner as RuntimeGroupRootObj).AddChild(childObj);
            if (!addToWaitList)
            {
                return;
            }
            ChildLeafInfo value     = null;
            IDisposable   reference = null;

            try
            {
                if (m_parentInfo == null)
                {
                    m_parentInfo = CreateParentInfo();
                }
                else
                {
                    m_parentInfo.TryGetAndPin(parentKey, out value, out reference);
                }
                if (value == null)
                {
                    value     = new ChildLeafInfo();
                    reference = m_parentInfo.AddAndPin(parentKey, value);
                }
                value.Add(childObj);
            }
            finally
            {
                reference?.Dispose();
            }
        }
        public override void Deserialize(IntermediateFormatReader reader)
        {
            base.Deserialize(reader);
            reader.RegisterDeclaration(m_declaration);
            while (reader.NextMember())
            {
                switch (reader.CurrentMember.MemberName)
                {
                case MemberName.Hashtable:
                    m_hashtable = reader.ReadRIFObject <ScalableDictionary <object, IReference <RuntimeHierarchyObj> > >();
                    break;

                case MemberName.ParentInfo:
                    m_parentInfo = reader.ReadRIFObject <ScalableDictionary <object, ChildLeafInfo> >();
                    break;

                default:
                    Global.Tracer.Assert(condition: false);
                    break;
                }
            }
        }
Beispiel #9
0
 public LookupTable(IScalabilityCache scalabilityCache, IEqualityComparer <object> comparer, bool mustStoreDataRows)
 {
     this.m_table = new ScalableDictionary <object, LookupMatches>(0, scalabilityCache, 100, 10, comparer);
 }