InternalReadInt32() private method

private InternalReadInt32 ( ) : int
return int
コード例 #1
0
 public virtual int ReadInt32()
 {
     if (this.m_isMemoryStream)
     {
         if (this.m_stream == null)
         {
             __Error.FileNotOpen();
         }
         MemoryStream stream = this.m_stream as MemoryStream;
         return(stream.InternalReadInt32());
     }
     this.FillBuffer(4);
     return(((this.m_buffer[0] | (this.m_buffer[1] << 8)) | (this.m_buffer[2] << 0x10)) | (this.m_buffer[3] << 0x18));
 }
コード例 #2
0
 public virtual int ReadInt32()
 {
     if (this.m_isMemoryStream)
     {
         if (this.m_stream == null)
         {
             __Error.FileNotOpen();
         }
         MemoryStream memoryStream = this.m_stream as MemoryStream;
         return(memoryStream.InternalReadInt32());
     }
     this.FillBuffer(4);
     return((int)this.m_buffer[0] | (int)this.m_buffer[1] << 8 | (int)this.m_buffer[2] << 16 | (int)this.m_buffer[3] << 24);
 }
コード例 #3
0
        public virtual int ReadInt32()
        {
            if (m_isMemoryStream)
            {
                // read directly from MemoryStream buffer
                MemoryStream mStream = m_stream as MemoryStream;
                BCLDebug.Assert(mStream != null, "m_stream as MemoryStream != null");

                return(mStream.InternalReadInt32());
            }
            else
            {
                FillBuffer(4);
                return((int)(m_buffer[0] | m_buffer[1] << 8 | m_buffer[2] << 16 | m_buffer[3] << 24));
            }
        }
コード例 #4
0
        public virtual int ReadInt32()
        {
            if (m_isMemoryStream)
            {
                if (m_stream == null)
                {
                    __Error.FileNotOpen();
                }
                // read directly from MemoryStream buffer
                MemoryStream mStream = m_stream as MemoryStream;

                return(mStream.InternalReadInt32());
            }
            else
            {
                FillBuffer(4);
                return((int)(m_buffer[0] | m_buffer[1] << 8 | m_buffer[2] << 16 | m_buffer[3] << 24));
            }
        }
コード例 #5
0
        public virtual int ReadInt32()
        {
            if (_isMemoryStream)
            {
                if (_stream == null)
                {
                    throw Error.GetFileNotOpen();
                }
                // read directly from MemoryStream buffer
                MemoryStream mStream = _stream as MemoryStream;
                Debug.Assert(mStream != null, "_stream as MemoryStream != null");

                return(mStream.InternalReadInt32());
            }
            else
            {
                FillBuffer(4);
                return((int)(_buffer[0] | _buffer[1] << 8 | _buffer[2] << 16 | _buffer[3] << 24));
            }
        }
コード例 #6
0
        public virtual int ReadInt32()
        {
            if (_isMemoryStream)
            {
                if (_stream == null)
                {
                    throw new ObjectDisposedException(null, SR.ObjectDisposed_FileClosed);
                }

                // read directly from MemoryStream buffer
                MemoryStream mStream = _stream as MemoryStream;
                Debug.Assert(mStream != null, "_stream as MemoryStream != null");

                return(mStream.InternalReadInt32());
            }
            else
            {
                FillBuffer(4);
                return((int)(_buffer[0] | _buffer[1] << 8 | _buffer[2] << 16 | _buffer[3] << 24));
            }
        }