/// <summary>
        /// Asynchronously starts a new changeset - implementation of the actual functionality.
        /// </summary>
        /// <param name="changesetId">The value for changeset boundary for multipart batch.</param>
        /// <returns>A task that represents the asynchronous write operation.</returns>
        protected override async Task WriteStartChangesetImplementationAsync(string changesetId)
        {
            Debug.Assert(changesetId != null, "changesetId != null");

            // Write pending message data (headers, response line) for a previously unclosed message/request
            await this.WritePendingMessageDataAsync(true)
            .ConfigureAwait(false);

            this.SetState(BatchWriterState.ChangesetStarted);
            Debug.Assert(this.changeSetBoundary == null, "this.changeSetBoundary == null");
            this.changeSetBoundary = ODataMultipartMixedBatchWriterUtils.CreateChangeSetBoundary(this.RawOutputContext.WritingResponse, changesetId);

            // Write the boundary string
            await ODataMultipartMixedBatchWriterUtils.WriteStartBoundaryAsync(
                this.RawOutputContext.TextWriter,
                this.batchBoundary,
                !this.batchStartBoundaryWritten).ConfigureAwait(false);

            this.batchStartBoundaryWritten = true;

            // Write the changeset headers
            await ODataMultipartMixedBatchWriterUtils.WriteChangesetPreambleAsync(
                this.RawOutputContext.TextWriter,
                this.changeSetBoundary).ConfigureAwait(false);

            this.changesetStartBoundaryWritten = false;

            // Set state to track dependsOnIds.
            this.dependsOnIdsTracker.ChangeSetStarted();
        }
        /// <summary>
        /// Starts a new changeset - implementation of the actual functionality.
        /// </summary>
        /// <param name="changeSetId">The value for changeset boundary for multipart batch.</param>
        protected override void WriteStartChangesetImplementation(string changeSetId)
        {
            Debug.Assert(changeSetId != null, "changeSetId != null");

            // write pending message data (headers, response line) for a previously unclosed message/request
            this.WritePendingMessageData(true);

            this.SetState(BatchWriterState.ChangesetStarted);
            Debug.Assert(this.changeSetBoundary == null, "this.changeSetBoundary == null");
            this.changeSetBoundary = ODataMultipartMixedBatchWriterUtils.CreateChangeSetBoundary(this.RawOutputContext.WritingResponse, changeSetId);

            // write the boundary string
            ODataMultipartMixedBatchWriterUtils.WriteStartBoundary(this.RawOutputContext.TextWriter, this.batchBoundary, !this.batchStartBoundaryWritten);
            this.batchStartBoundaryWritten = true;

            // write the change set headers
            ODataMultipartMixedBatchWriterUtils.WriteChangeSetPreamble(this.RawOutputContext.TextWriter, this.changeSetBoundary);
            this.changesetStartBoundaryWritten = false;
        }