private void SetupStorage()
        {
            if (m_stream != null)
            {
                return;
            }
            m_stream        = m_streamCreator.OpenStream();
            m_streamCreator = null;
            List <Declaration> declarations = m_unifiedObjectCreator.GetDeclarations();

            if (m_fromExistingStream)
            {
                m_reader = new IntermediateFormatReader(m_stream, m_unifiedObjectCreator, m_globalIdsFromOtherStream, m_scalabilityCache);
                if (m_stream.CanWrite)
                {
                    m_writer      = new IntermediateFormatWriter(m_stream, m_stream.Length, declarations, m_scalabilityCache, m_rifCompatVersion, m_prohibitSerializableValues);
                    m_writerSetup = true;
                }
                m_atEnd = false;
            }
            else
            {
                m_writer      = new IntermediateFormatWriter(m_stream, declarations, m_scalabilityCache, m_rifCompatVersion, m_prohibitSerializableValues);
                m_writerSetup = true;
                m_reader      = new IntermediateFormatReader(m_stream, m_unifiedObjectCreator, m_globalIdsFromOtherStream, m_scalabilityCache, declarations, Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.IntermediateFormatVersion.Current, PersistenceFlags.Seekable);
                m_atEnd       = true;
            }
            m_fromExistingStream = true;
        }
Ejemplo n.º 2
0
 private void SetupStorage()
 {
     if (m_stream == null)
     {
         Stream stream = m_streamCreator.OpenStream();
         m_streamCreator = null;
         m_stream        = new PageBufferedStream(stream, m_bufferPageSize, m_bufferPageCount);
         m_stream.FreezePageAllocations = m_freezeAllocations;
         List <Declaration> declarations = m_unifiedObjectCreator.GetDeclarations();
         m_memoryStream = new MemoryStream(m_tempStreamSize);
         m_writer       = new IntermediateFormatWriter(m_memoryStream, declarations, m_scalabilityCache, m_rifCompatVersion);
         if (m_fromExistingStream)
         {
             m_spaceManager.StreamEnd = m_stream.Length;
             m_reader = new IntermediateFormatReader(m_stream, m_unifiedObjectCreator, m_globalIdsFromOtherStream, m_scalabilityCache, declarations, IntermediateFormatVersion.Current, PersistenceFlags.Seekable);
         }
         else
         {
             m_spaceManager.StreamEnd = m_stream.Position;
             m_reader = new IntermediateFormatReader(m_stream, m_unifiedObjectCreator, m_globalIdsFromOtherStream, m_scalabilityCache, declarations, IntermediateFormatVersion.Current, PersistenceFlags.Seekable);
         }
     }
 }