public override Task ProcessAsync(HttpPipelineMessage message, ReadOnlyMemory <HttpPipelinePolicy> pipeline) { Debug.Assert(pipeline.IsEmpty); return(_transport.ProcessAsync(message)); }
internal HttpMessageOptions(HttpPipelineMessage message) => _message = message;
protected static async Task ProcessNextAsync(ReadOnlyMemory <HttpPipelinePolicy> pipeline, HttpPipelineMessage message) { if (pipeline.IsEmpty) { throw new InvalidOperationException("last policy in the pipeline must be a transport"); } var next = pipeline.Span[0]; await next.ProcessAsync(message, pipeline.Slice(1)).ConfigureAwait(false); }
public abstract Task ProcessAsync(HttpPipelineMessage message);
/// <summary> /// Applies the policy to the <see cref="message"/>. Implementers are expected to mutate <see cref="HttpPipelineMessage.Request"/> before calling <see cref="ProcessNextAsync"/> and observe the <see cref="HttpPipelineMessage.Response"/> changes after. /// Last policy in the pipeline is expected to set the <see cref="HttpPipelineMessage.Response"/> /// </summary> /// <param name="message">The <see cref="HttpPipelineMessage"/> this policy would be applied to.</param> /// <param name="pipeline">The set of <see cref="HttpPipelinePolicy"/> to execute after current one.</param> /// <returns></returns> public abstract Task ProcessAsync(HttpPipelineMessage message, ReadOnlyMemory <HttpPipelinePolicy> pipeline);