예제 #1
0
 public override bool MoveNext()
 {
     m_current = null;
     if (m_nodeInfoStack == null)
     {
         m_nodeInfoStack = new Stack <IEnumerator <Microsoft.ReportingServices.ReportProcessing.DocumentMapNode> >();
         m_current       = new DocumentMapNode(m_oldDocMap.Label, m_oldDocMap.Id, m_nodeInfoStack.Count + 1);
         m_nodeInfoStack.Push(((IEnumerable <Microsoft.ReportingServices.ReportProcessing.DocumentMapNode>)m_oldDocMap.Children).GetEnumerator());
         return(true);
     }
     if (m_nodeInfoStack.Count == 0)
     {
         return(false);
     }
     while (m_nodeInfoStack.Count > 0 && !m_nodeInfoStack.Peek().MoveNext())
     {
         m_nodeInfoStack.Pop();
     }
     if (m_nodeInfoStack.Count == 0)
     {
         return(false);
     }
     Microsoft.ReportingServices.ReportProcessing.DocumentMapNode current = m_nodeInfoStack.Peek().Current;
     m_current = new DocumentMapNode(current.Label, current.Id, m_nodeInfoStack.Count + 1);
     if (current.Children != null && current.Children.Length != 0)
     {
         m_nodeInfoStack.Push(((IEnumerable <Microsoft.ReportingServices.ReportProcessing.DocumentMapNode>)current.Children).GetEnumerator());
     }
     return(true);
 }
        public bool MoveNext()
        {
            if (m_rifReader.EOS)
            {
                return(false);
            }
            m_currentNode = null;
            IPersistable persistable = m_rifReader.ReadRIFObject();

            switch (persistable.GetObjectType())
            {
            case Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType.DocumentMapBeginContainer:
            {
                bool result = MoveNext();
                m_level++;
                return(result);
            }

            case Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType.DocumentMapEndContainer:
                m_level--;
                return(MoveNext());

            case Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType.DocumentMapNode:
            {
                DocumentMapNode documentMapNode = (DocumentMapNode)persistable;
                m_currentNode = new Microsoft.ReportingServices.OnDemandReportRendering.DocumentMapNode(documentMapNode.Label, documentMapNode.Id, m_level);
                return(true);
            }

            default:
                Global.Tracer.Assert(condition: false);
                return(false);
            }
        }
예제 #3
0
 public override void Reset()
 {
     m_current       = null;
     m_nodeInfoStack = null;
 }