Exemplo n.º 1
0
        private void CopyDomainScopeGroupInstance(RuntimeGroupRootObj destination, ScalableDictionary <object, IReference <RuntimeHierarchyObj> > runtimeHierarchyObjRefs)
        {
            IReference <RuntimeHierarchyObj> reference = null;

            DomainScopeContext.DomainScopeInfo currentDomainScope = base.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;
                        this.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();
            }
        }
Exemplo n.º 2
0
        public override void NextRow()
        {
            bool flag = true;
            RuntimeGroupRootObj runtimeGroupRootObj = null;

            using (this.m_hierarchyRoot.PinValue())
            {
                if (this.m_hierarchyRoot is RuntimeGroupRootObjReference)
                {
                    runtimeGroupRootObj = (RuntimeGroupRootObj)this.m_hierarchyRoot.Value();
                    if (ProcessingStages.SortAndFilter == runtimeGroupRootObj.ProcessingStage)
                    {
                        flag = false;
                    }
                }
                if (this.m_hierarchyObjs != null)
                {
                    if (flag)
                    {
                        IReference <RuntimeHierarchyObj> reference = this.m_hierarchyObjs[0];
                        Global.Tracer.Assert(null != reference, "(null != hierarchyObj)");
                        using (reference.PinValue())
                        {
                            reference.Value().NextRow();
                        }
                    }
                    else if (runtimeGroupRootObj != null)
                    {
                        RuntimeGroupLeafObjReference lastChild = runtimeGroupRootObj.LastChild;
                        Global.Tracer.Assert((BaseReference)null != (object)lastChild, "(null != groupLastChild)");
                        this.m_hierarchyObjs.Add(lastChild);
                    }
                }
                else if (this.m_grouping != null)
                {
                    AspNetCore.ReportingServices.ReportProcessing.ObjectType objectType = runtimeGroupRootObj.HierarchyDef.DataRegionDef.ObjectType;
                    string             name               = runtimeGroupRootObj.HierarchyDef.DataRegionDef.Name;
                    string             propertyName       = "GroupExpression";
                    DomainScopeContext domainScopeContext = base.OdpContext.DomainScopeContext;
                    DomainScopeContext.DomainScopeInfo domainScopeInfo = null;
                    if (domainScopeContext != null)
                    {
                        domainScopeInfo = domainScopeContext.CurrentDomainScope;
                    }
                    object obj;
                    if (domainScopeInfo != null)
                    {
                        domainScopeInfo.MoveNext();
                        obj = domainScopeInfo.CurrentKey;
                    }
                    else
                    {
                        obj = ((this.m_expression != null) ? base.m_odpContext.ReportRuntime.EvaluateRuntimeExpression(this.m_expression, objectType, name, propertyName) : ((object)base.m_odpContext.ReportObjectModel.FieldsImpl.GetRowIndex()));
                    }
                    if (runtimeGroupRootObj != null && flag)
                    {
                        AspNetCore.ReportingServices.ReportIntermediateFormat.Grouping grouping = runtimeGroupRootObj.HierarchyDef.Grouping;
                        if (runtimeGroupRootObj.SaveGroupExprValues)
                        {
                            grouping.CurrentGroupExpressionValues.Add(obj);
                        }
                        this.MatchSortFilterScope(runtimeGroupRootObj.SelfReference, grouping, obj, this.m_expression.ExpressionIndex);
                    }
                    this.m_grouping.NextRow(obj);
                    if (domainScopeInfo != null)
                    {
                        domainScopeInfo.MovePrevious();
                    }
                }
            }
        }