Show / Hide Table of Contents

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
System.Object
PipelinePolicy
ApiKeyAuthenticationPolicy
ClientRetryPolicy
MessageLoggingPolicy
PipelineTransport
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 pipeline policy list. This value should be passed to ProcessNext(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32) to pass control to the next policy in the pipeline.

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 pipeline policy list. This value should be passed to ProcessNextAsync(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32) to pass control to the next policy in the pipeline.

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 pipeline policy list. The derived-type implementation of Process(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32) should pass the value of currentIndex it received without modifying it.

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 pipeline policy list. The derived-type implementation of ProcessAsync(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32) should pass the value of currentIndex it received without modifying it.

Returns
System.Threading.Tasks.ValueTask

Back to top Azure SDK for .NET