<PackageReference Include="System.ClientModel" Version="1.8.1" />

System.ClientModel.Primitives.PipelinePolicy

public abstract class PipelinePolicy
A policy that can be added to a ClientPipeline to process a PipelineMessage during a call to Send. Types deriving from PipelinePolicy can read or modify the Request, implement functionality based on Response, and must pass control to the next PipelinePolicy in the pipeline by calling ProcessNext.
protected PipelinePolicy()

protected static void ProcessNext(PipelineMessage message, IReadOnlyList<PipelinePolicy> pipeline, int currentIndex)

Passes control to the next PipelinePolicy in the ClientPipeline.

protected static ValueTask ProcessNextAsync(PipelineMessage message, IReadOnlyList<PipelinePolicy> pipeline, int currentIndex)

Passes control to the next PipelinePolicy in the ClientPipeline.

public abstract void Process(PipelineMessage message, IReadOnlyList<PipelinePolicy> pipeline, int currentIndex)

Process the provided PipelineMessage according to the intended purpose of this PipelinePolicyinstance. Derived types must pass control to the next PipelinePolicy in the pipeline by calling ProcessNext.

public abstract ValueTask ProcessAsync(PipelineMessage message, IReadOnlyList<PipelinePolicy> pipeline, int currentIndex)

Process the provided PipelineMessage according to the intended purpose of this PipelinePolicyinstance. Derived types must pass control to the next PipelinePolicy in the pipeline by calling ProcessNextAsync.