コード例 #1
0
        IDisposable IMemberHierarchy.AddMemberInstance(DataRegionMemberInstance instance, int indexInCollection, IScalabilityCache cache, out int instanceIndex)
        {
            List <ScalableList <DataRegionMemberInstance> > list = instance.MemberDef.IsColumn ? this.m_columnMembers : this.m_rowMembers;
            bool flag = false;

            if (list == null)
            {
                flag = true;
                list = new List <ScalableList <DataRegionMemberInstance> >();
                if (instance.MemberDef.IsColumn)
                {
                    this.m_columnMembers = list;
                }
                else
                {
                    this.m_rowMembers = list;
                }
            }
            ListUtils.AdjustLength(list, indexInCollection);
            ScalableList <DataRegionMemberInstance> scalableList = list[indexInCollection];

            if (flag || scalableList == null)
            {
                scalableList = (list[indexInCollection] = new ScalableList <DataRegionMemberInstance>(0, cache, 100, 5));
            }
            instanceIndex = scalableList.Count;
            return(scalableList.AddAndPin(instance));
        }
コード例 #2
0
        public static DataRegionMemberInstance CreateInstance(IMemberHierarchy parentInstance, OnDemandProcessingContext odpContext, ReportHierarchyNode memberDef, long firstRowOffset, int memberInstanceIndexWithinScopeLevel, int recursiveLevel, List <object> groupExpressionValues, object[] groupVariableValues, out int instanceIndex)
        {
            DataRegionMemberInstance dataRegionMemberInstance = new DataRegionMemberInstance(odpContext, memberDef, firstRowOffset, memberInstanceIndexWithinScopeLevel, recursiveLevel, groupExpressionValues, groupVariableValues);

            dataRegionMemberInstance.m_cleanupRef = parentInstance.AddMemberInstance(dataRegionMemberInstance, memberDef.IndexInCollection, (IScalabilityCache)odpContext.OdpMetadata.GroupTreeScalabilityCache, out instanceIndex);
            return(dataRegionMemberInstance);
        }
コード例 #3
0
        IDisposable IMemberHierarchy.AddMemberInstance(DataRegionMemberInstance instance, int indexInCollection, IScalabilityCache cache, out int instanceIndex)
        {
            bool flag = false;

            if (this.m_children == null)
            {
                this.m_children = new List <ScalableList <DataRegionMemberInstance> >();
                flag            = true;
            }
            ListUtils.AdjustLength(this.m_children, indexInCollection);
            ScalableList <DataRegionMemberInstance> scalableList = this.m_children[indexInCollection];

            if (flag || scalableList == null)
            {
                scalableList = new ScalableList <DataRegionMemberInstance>(0, cache, 100, 5);
                this.m_children[indexInCollection] = scalableList;
            }
            instanceIndex = scalableList.Count;
            return(scalableList.AddAndPin(instance));
        }
コード例 #4
0
        private static void TraceDataRegionMemberInstance(DataRegionMemberInstance instance, int level)
        {
            Global.Tracer.Assert(null != instance, "(null != instance)");
            string emptyString = GroupTreeTracer.GetEmptyString(level);

            Global.Tracer.Trace("{0}DataRegionMemberInstance={1}, [id={2}], Index={3}, RecursiveLevel={4}", emptyString, instance.MemberDef.Grouping.Name, instance.MemberDef.ID, instance.MemberInstanceIndexWithinScopeLevel, instance.RecursiveLevel);
            if (instance.GroupVariables != null)
            {
                Global.Tracer.Trace("{0}Group Variables={1}", emptyString, GroupTreeTracer.FlattenObjectArray(instance.GroupVariables));
            }
            if (instance.GroupExprValues != null)
            {
                Global.Tracer.Trace("{0}Group Expr.Vals={1}", emptyString, GroupTreeTracer.FlattenObjectArray(instance.GroupExprValues));
            }
            GroupTreeTracer.TraceScopeInstance(instance, level + 1);
            GroupTreeTracer.TraceCellInstances(instance.Cells, level + 1);
            if (instance.Children != null && instance.Children.Count != 0)
            {
                GroupTreeTracer.TraceDataRegionMemberInstances(instance.Children, level + 1);
            }
        }