/// <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 ODataMultipartMixedBatchWriter(ODataMultipartMixedBatchOutputContext rawOutputContext, string batchBoundary)
     : base(rawOutputContext)
 {
     Debug.Assert(rawOutputContext != null, "rawOutputContext != null");
     ExceptionUtils.CheckArgumentNotNull(batchBoundary, "batchBoundary is null");
     this.batchBoundary = batchBoundary;
     this.RawOutputContext.InitializeRawValueWriter();
     this.dependsOnIdsTracker = new DependsOnIdsTracker();
 }
Exemple #2
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 ODataMultipartMixedBatchReader(ODataMultipartMixedBatchInputContext inputContext, string batchBoundary, Encoding batchEncoding, bool synchronous)
            : base(inputContext, synchronous)
        {
            Debug.Assert(inputContext != null, "inputContext != null");
            Debug.Assert(!string.IsNullOrEmpty(batchBoundary), "!string.IsNullOrEmpty(batchBoundary)");

            this.batchStream         = new ODataMultipartMixedBatchReaderStream(this.MultipartMixedBatchInputContext, batchBoundary, batchEncoding);
            this.dependsOnIdsTracker = new DependsOnIdsTracker();
        }