/// <summary> /// Returns the cached <see cref="ODataBatchOperationRequestMessage"/> for reading the content of an operation /// in a batch request. /// </summary> /// <returns>The message that can be used to read the content of the batch request operation from.</returns> private ODataBatchOperationResponseMessage CreateOperationResponseMessageImplementation() { this.operationState = OperationState.MessageCreated; string responseLine = this.batchStream.ReadFirstNonEmptyLine(); int statusCode = this.ParseResponseLine(responseLine); // Read all headers and create the response message ODataBatchOperationHeaders headers = this.batchStream.ReadHeaders(); // In responses we don't need to use our batch URL resolver, since there are no cross referencing URLs // so use the URL resolver from the batch message instead. ODataBatchOperationResponseMessage responseMessage = ODataBatchOperationResponseMessage.CreateReadMessage( this.batchStream, statusCode, headers, /*operationListener*/ this, this.urlResolver.BatchMessageUrlResolver); //// NOTE: Content-IDs for cross referencing are only supported in request messages; in responses //// we allow a Content-ID header but don't process it (i.e., don't add the content ID to the URL resolver). return(responseMessage); }
private ODataBatchOperationResponseMessage CreateOperationResponseMessageImplementation() { this.operationState = OperationState.MessageCreated; string responseLine = this.batchStream.ReadLine(); while (responseLine.Length == 0) { responseLine = this.batchStream.ReadLine(); } int statusCode = this.ParseResponseLine(responseLine); ODataBatchOperationHeaders headers = this.batchStream.ReadHeaders(); return(ODataBatchOperationResponseMessage.CreateReadMessage(this.batchStream, statusCode, headers, this, this.urlResolver.BatchMessageUrlResolver)); }