Class PipelinePolicy
A policy that can be added to a ClientPipeline to process a PipelineMessage during a call to Send(PipelineMessage). 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(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32).
Inheritance
Namespace: System.Dynamic.ExpandoObject
Assembly: System.ClientModel.dll
Syntax
[System.Runtime.CompilerServices.Nullable(0)]
[System.Runtime.CompilerServices.NullableContext(1)]
public abstract class PipelinePolicy
Constructors
PipelinePolicy()
Declaration
protected PipelinePolicy ();
Methods
Process(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32)
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(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32).
Declaration
public abstract void Process (System.ClientModel.Primitives.PipelineMessage message, System.Collections.Generic.IReadOnlyList<System.ClientModel.Primitives.PipelinePolicy> pipeline, int currentIndex);
Parameters
PipelineMessage
message
The PipelineMessage to process. |
System.Collections.Generic.IReadOnlyList<PipelinePolicy>
pipeline
The collection of PipelinePolicy instances in the ClientPipeline instance whose Send(PipelineMessage) method was called to invoke this method. |
System.Int32
currentIndex
The index of this policy in the
|
ProcessAsync(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32)
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(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32).
Declaration
public abstract System.Threading.Tasks.ValueTask ProcessAsync (System.ClientModel.Primitives.PipelineMessage message, System.Collections.Generic.IReadOnlyList<System.ClientModel.Primitives.PipelinePolicy> pipeline, int currentIndex);
Parameters
PipelineMessage
message
The PipelineMessage to process. |
System.Collections.Generic.IReadOnlyList<PipelinePolicy>
pipeline
The collection of PipelinePolicy instances in the ClientPipeline instance whose SendAsync(PipelineMessage) method was called to invoke this method. |
System.Int32
currentIndex
The index of this policy in the
|
Returns
System.Threading.Tasks.ValueTask
|
ProcessNext(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32)
Passes control to the next PipelinePolicy in the ClientPipeline.
Declaration
protected static void ProcessNext (System.ClientModel.Primitives.PipelineMessage message, System.Collections.Generic.IReadOnlyList<System.ClientModel.Primitives.PipelinePolicy> pipeline, int currentIndex);
Parameters
PipelineMessage
message
The PipelineMessage to process. |
System.Collections.Generic.IReadOnlyList<PipelinePolicy>
pipeline
The collection of PipelinePolicy instances in the ClientPipeline. |
System.Int32
currentIndex
The index of this policy in the
|
ProcessNextAsync(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32)
Passes control to the next PipelinePolicy in the ClientPipeline.
Declaration
[System.Diagnostics.DebuggerStepThrough]
protected static System.Threading.Tasks.ValueTask ProcessNextAsync (System.ClientModel.Primitives.PipelineMessage message, System.Collections.Generic.IReadOnlyList<System.ClientModel.Primitives.PipelinePolicy> pipeline, int currentIndex);
Parameters
PipelineMessage
message
The PipelineMessage to process. |
System.Collections.Generic.IReadOnlyList<PipelinePolicy>
pipeline
The collection of PipelinePolicy instances in the ClientPipeline. |
System.Int32
currentIndex
The index of this policy in the
|
Returns
System.Threading.Tasks.ValueTask
|