/// <summary> /// Constructor. /// </summary> /// <param name="inputContext">The input context to read the content from.</param> /// <param name="synchronous">true if the reader is created for synchronous operation; false for asynchronous.</param> protected ODataBatchReader(ODataInputContext inputContext, bool synchronous) { Debug.Assert(inputContext != null, "inputContext != null"); this.inputContext = inputContext; this.container = inputContext.Container; this.synchronous = synchronous; this.PayloadUriConverter = new ODataBatchPayloadUriConverter(inputContext.PayloadUriConverter); }
/// <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> /// <param name="synchronous">true if the reader is created for synchronous operation; false for asynchronous.</param> internal ODataBatchReader(ODataRawInputContext inputContext, string batchBoundary, Encoding batchEncoding, bool synchronous) { Debug.Assert(inputContext != null, "inputContext != null"); Debug.Assert(!string.IsNullOrEmpty(batchBoundary), "!string.IsNullOrEmpty(batchBoundary)"); this.inputContext = inputContext; this.container = inputContext.Container; this.synchronous = synchronous; this.payloadUriConverter = new ODataBatchPayloadUriConverter(inputContext.PayloadUriConverter); this.batchStream = new ODataBatchReaderStream(inputContext, batchBoundary, batchEncoding); this.allowLegacyContentIdBehaviour = true; }