Esempio n. 1
0
 internal ODataBatchReaderStream(ODataRawInputContext inputContext, string batchBoundary, Encoding batchEncoding)
 {
     this.inputContext = inputContext;
     this.batchBoundary = batchBoundary;
     this.batchEncoding = batchEncoding;
     this.batchBuffer = new ODataBatchReaderStreamBuffer();
     this.lineBuffer = new byte[0x7d0];
 }
 internal ODataBatchReaderStream(ODataRawInputContext inputContext, string batchBoundary, Encoding batchEncoding)
 {
     this.inputContext  = inputContext;
     this.batchBoundary = batchBoundary;
     this.batchEncoding = batchEncoding;
     this.batchBuffer   = new ODataBatchReaderStreamBuffer();
     this.lineBuffer    = new byte[0x7d0];
 }
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="inputContext">The input context to read the content from.</param>
        /// <param name="batchBoundary">The boundary string for the batch structure itself.</param>
        /// <param name="batchEncoding">The encoding to use to read from the batch stream.</param>
        internal ODataBatchReaderStream(
            ODataRawInputContext inputContext,
            string batchBoundary,
            Encoding batchEncoding)
        {
            DebugUtils.CheckNoExternalCallers();
            Debug.Assert(inputContext != null, "inputContext != null");
            Debug.Assert(!string.IsNullOrEmpty(batchBoundary), "!string.IsNullOrEmpty(batchBoundary)");

            this.inputContext  = inputContext;
            this.batchBoundary = batchBoundary;
            this.batchEncoding = batchEncoding;

            this.batchBuffer = new ODataBatchReaderStreamBuffer();

            // When we allocate a batch reader stream we will in almost all cases also call ReadLine
            // (to read the headers of the parts); so allocating it here.
            this.lineBuffer = new byte[LineBufferLength];
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="inputContext">The input context to read the content from.</param>
        /// <param name="batchBoundary">The boundary string for the batch structure itself.</param>
        /// <param name="batchEncoding">The encoding to use to read from the batch stream.</param>
        internal ODataBatchReaderStream(
            ODataRawInputContext inputContext, 
            string batchBoundary, 
            Encoding batchEncoding)
        {
            DebugUtils.CheckNoExternalCallers();
            Debug.Assert(inputContext != null, "inputContext != null");
            Debug.Assert(!string.IsNullOrEmpty(batchBoundary), "!string.IsNullOrEmpty(batchBoundary)");

            this.inputContext = inputContext;
            this.batchBoundary = batchBoundary;
            this.batchEncoding = batchEncoding;

            this.batchBuffer = new ODataBatchReaderStreamBuffer();

            // When we allocate a batch reader stream we will in almost all cases also call ReadLine
            // (to read the headers of the parts); so allocating it here.
            this.lineBuffer = new byte[LineBufferLength];
        }