Пример #1
0
        internal RuntimeSortHierarchyObj(IHierarchyObj outerHierarchy, int depth)
        {
            m_hierarchyRoot = outerHierarchy.HierarchyRoot;
            m_odpContext    = m_hierarchyRoot.Value().OdpContext;
            List <int> sortFilterInfoIndices = m_hierarchyRoot.Value().SortFilterInfoIndices;
            int        num = outerHierarchy.ExpressionIndex + 1;

            if (sortFilterInfoIndices == null || num >= sortFilterInfoIndices.Count)
            {
                RuntimeDataTablixGroupRootObjReference runtimeDataTablixGroupRootObjReference = m_hierarchyRoot as RuntimeDataTablixGroupRootObjReference;
                if (null != runtimeDataTablixGroupRootObjReference)
                {
                    using (runtimeDataTablixGroupRootObjReference.PinValue())
                    {
                        RuntimeDataTablixGroupRootObj runtimeDataTablixGroupRootObj = runtimeDataTablixGroupRootObjReference.Value();
                        m_dataHolder = (IReference <ISortDataHolder>)runtimeDataTablixGroupRootObj.CreateGroupLeaf();
                        if (!runtimeDataTablixGroupRootObj.HasParent)
                        {
                            runtimeDataTablixGroupRootObj.AddChildWithNoParent((RuntimeGroupLeafObjReference)m_dataHolder);
                        }
                    }
                }
                else
                {
                    m_dataRowHolder = new RuntimeSortDataHolder();
                }
            }
            else
            {
                m_sortHierarchyStruct = new SortHierarchyStructure(this, num, m_odpContext.RuntimeSortFilterInfo, sortFilterInfoIndices);
            }
        }
Пример #2
0
        void IPersistable.Deserialize(IntermediateFormatReader reader)
        {
            reader.RegisterDeclaration(m_declaration);
            _ = reader.PersistenceHelper;
            while (reader.NextMember())
            {
                switch (reader.CurrentMember.MemberName)
                {
                case MemberName.HierarchyRoot:
                    m_hierarchyRoot = (IReference <IHierarchyObj>)reader.ReadRIFObject();
                    break;

                case MemberName.DataRowHolder:
                    m_dataRowHolder = (RuntimeSortDataHolder)reader.ReadRIFObject();
                    break;

                case MemberName.Expression:
                    m_sortExpression = (RuntimeExpressionInfo)reader.ReadRIFObject();
                    break;

                case MemberName.SortTree:
                    m_sortTree = (BTree)reader.ReadRIFObject();
                    break;

                default:
                    Global.Tracer.Assert(condition: false);
                    break;
                }
            }
        }
Пример #3
0
        internal RuntimeDataRowSortHierarchyObj(IHierarchyObj outerHierarchy, int depth)
        {
            m_hierarchyRoot = outerHierarchy.HierarchyRoot;
            int num = outerHierarchy.ExpressionIndex + 1;

            Microsoft.ReportingServices.ReportIntermediateFormat.Sorting sortingDef = ((IDataRowSortOwner)m_hierarchyRoot.Value()).SortingDef;
            if (sortingDef.SortExpressions == null || num >= sortingDef.SortExpressions.Count)
            {
                m_dataRowHolder = new RuntimeSortDataHolder();
                return;
            }
            m_sortExpression = new RuntimeExpressionInfo(sortingDef.SortExpressions, sortingDef.ExprHost, sortingDef.SortDirections, num);
            m_sortTree       = new BTree(this, OdpContext, depth);
        }
Пример #4
0
        void IPersistable.Deserialize(IntermediateFormatReader reader)
        {
            reader.RegisterDeclaration(m_declaration);
            IScalabilityCache scalabilityCache = reader.PersistenceHelper as IScalabilityCache;

            while (reader.NextMember())
            {
                switch (reader.CurrentMember.MemberName)
                {
                case MemberName.HierarchyRoot:
                    m_hierarchyRoot = (IReference <IHierarchyObj>)reader.ReadRIFObject();
                    break;

                case MemberName.OdpContext:
                {
                    int id = reader.ReadInt32();
                    m_odpContext = (OnDemandProcessingContext)scalabilityCache.FetchStaticReference(id);
                    break;
                }

                case MemberName.SortHierarchyStruct:
                    m_sortHierarchyStruct = (SortHierarchyStructure)reader.ReadRIFObject();
                    break;

                case MemberName.DataHolder:
                    m_dataHolder = (IReference <ISortDataHolder>)reader.ReadRIFObject();
                    break;

                case MemberName.DataRowHolder:
                    m_dataRowHolder = (RuntimeSortDataHolder)reader.ReadRIFObject();
                    break;

                default:
                    Global.Tracer.Assert(condition: false);
                    break;
                }
            }
        }