Ejemplo n.º 1
0
 internal ODataBatchReader(ODataRawInputContext inputContext, string batchBoundary, Encoding batchEncoding, bool synchronous)
 {
     this.inputContext = inputContext;
     this.synchronous  = synchronous;
     this.urlResolver  = new ODataBatchUrlResolver(inputContext.UrlResolver);
     this.batchStream  = new ODataBatchReaderStream(inputContext, batchBoundary, batchEncoding);
 }
Ejemplo n.º 2
0
 internal ODataBatchWriter(ODataRawOutputContext rawOutputContext, string batchBoundary)
 {
     ExceptionUtils.CheckArgumentNotNull<string>(batchBoundary, "batchBoundary");
     this.rawOutputContext = rawOutputContext;
     this.batchBoundary = batchBoundary;
     this.urlResolver = new ODataBatchUrlResolver(rawOutputContext.UrlResolver);
     this.rawOutputContext.InitializeTextWriter();
 }
Ejemplo n.º 3
0
 internal ODataBatchWriter(ODataRawOutputContext rawOutputContext, string batchBoundary)
 {
     ExceptionUtils.CheckArgumentNotNull <string>(batchBoundary, "batchBoundary");
     this.rawOutputContext = rawOutputContext;
     this.batchBoundary    = batchBoundary;
     this.urlResolver      = new ODataBatchUrlResolver(rawOutputContext.UrlResolver);
     this.rawOutputContext.InitializeTextWriter();
 }
Ejemplo n.º 4
0
        /// <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)
        {
            DebugUtils.CheckNoExternalCallers();
            Debug.Assert(inputContext != null, "inputContext != null");
            Debug.Assert(!string.IsNullOrEmpty(batchBoundary), "!string.IsNullOrEmpty(batchBoundary)");

            this.inputContext = inputContext;
            this.synchronous  = synchronous;
            this.urlResolver  = new ODataBatchUrlResolver(inputContext.UrlResolver);
            this.batchStream  = new ODataBatchReaderStream(inputContext, batchBoundary, batchEncoding);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="rawOutputContext">The output context to write to.</param>
        /// <param name="batchBoundary">The boundary string for the batch structure itself.</param>
        internal ODataBatchWriter(ODataRawOutputContext rawOutputContext, string batchBoundary)
        {
            DebugUtils.CheckNoExternalCallers();
            Debug.Assert(rawOutputContext != null, "rawOutputContext != null");
            Debug.Assert(
                rawOutputContext.MessageWriterSettings.BaseUri == null || rawOutputContext.MessageWriterSettings.BaseUri.IsAbsoluteUri,
                "We should have validated that BaseUri is absolute.");

            ExceptionUtils.CheckArgumentNotNull(batchBoundary, "batchBoundary");

            this.rawOutputContext = rawOutputContext;
            this.batchBoundary = batchBoundary;
            this.urlResolver = new ODataBatchUrlResolver(rawOutputContext.UrlResolver);
            this.rawOutputContext.InitializeTextWriter();
        }