/// <summary> /// Constructor. Creates a request message for an operation of a batch request. /// </summary> /// <param name="contentStreamCreatorFunc">A function to create the content stream.</param> /// <param name="method">The HTTP method used for this request message.</param> /// <param name="requestUrl">The request Url for this request message.</param> /// <param name="headers">The headers for this request message.</param> /// <param name="operationListener">Listener interface to be notified of operation changes.</param> /// <param name="contentId">The content-ID for the operation request message.</param> /// <param name="payloadUriConverter">The optional URL converter to perform custom URL conversion for URLs written to the payload.</param> /// <param name="writing">true if the request message is being written; false when it is read.</param> /// <param name="container">The dependency injection container to get related services.</param> /// <param name="dependsOnIds"> /// Request or group Ids that current request has dependency on. Values are added to a new list. /// Empty list will be created if value is null. /// </param> /// <param name="groupId">Value for the group id that current request belongs to. Can be null.</param> internal ODataBatchOperationRequestMessage( Func <Stream> contentStreamCreatorFunc, string method, Uri requestUrl, ODataBatchOperationHeaders headers, IODataBatchOperationListener operationListener, string contentId, IODataPayloadUriConverter payloadUriConverter, bool writing, IServiceProvider container, IEnumerable <string> dependsOnIds, string groupId) { Debug.Assert(contentStreamCreatorFunc != null, "contentStreamCreatorFunc != null"); Debug.Assert(operationListener != null, "operationListener != null"); Debug.Assert(payloadUriConverter != null, "payloadUriConverter != null"); this.Method = method; this.Url = requestUrl; this.ContentId = contentId; this.groupId = groupId; this.message = new ODataBatchOperationMessage(contentStreamCreatorFunc, headers, operationListener, payloadUriConverter, writing); this.Container = container; this.dependsOnIds = dependsOnIds == null ? new List <string>() : new List <string>(dependsOnIds); }
/// <summary> /// Constructor. /// </summary> /// <param name="contentStreamCreatorFunc">A function to retrieve the content stream for this batch operation message.</param> /// <param name="headers">The headers of the batch operation message.</param> /// <param name="operationListener">Listener interface to be notified of part changes.</param> /// <param name="contentId">The content-ID for the operation response message.</param> /// <param name="payloadUriConverter">The optional URL converter to perform custom URL conversion for URLs written to the payload.</param> /// <param name="writing">true if the request message is being written; false when it is read.</param> /// <param name="container">The dependency injection container to get related services.</param> private ODataBatchOperationResponseMessage( Func <Stream> contentStreamCreatorFunc, ODataBatchOperationHeaders headers, IODataBatchOperationListener operationListener, string contentId, IODataPayloadUriConverter payloadUriConverter, bool writing, IServiceProvider container) { Debug.Assert(contentStreamCreatorFunc != null, "contentStreamCreatorFunc != null"); Debug.Assert(operationListener != null, "operationListener != null"); this.message = new ODataBatchOperationMessage(contentStreamCreatorFunc, headers, operationListener, payloadUriConverter, writing); this.ContentId = contentId; this.Container = container; }