Show / Hide Table of Contents

Class MessageLoggingPolicy

A PipelinePolicy used by a ClientPipeline to log request and response information.

Inheritance
System.Object
PipelinePolicy
MessageLoggingPolicy
Namespace: System.Dynamic.ExpandoObject
Assembly: System.ClientModel.dll
Syntax
[System.Runtime.CompilerServices.Nullable(0)]
[System.Runtime.CompilerServices.NullableContext(1)]
public class MessageLoggingPolicy : System.ClientModel.Primitives.PipelinePolicy

Constructors

MessageLoggingPolicy(ClientLoggingOptions)

Creates a new instance of the MessageLoggingPolicy class.

Declaration
[System.Runtime.CompilerServices.NullableContext(2)]
public MessageLoggingPolicy (System.ClientModel.Primitives.ClientLoggingOptions options = null);
Parameters
ClientLoggingOptions options

The user-provided logging options object.

Properties

Default

The ClientRetryPolicy instance used by a default ClientPipeline.

Declaration
public static System.ClientModel.Primitives.MessageLoggingPolicy Default { get; }
Property Value
MessageLoggingPolicy

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 override sealed 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
[System.Diagnostics.DebuggerStepThrough]
public override sealed 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

Back to top Azure SDK for .NET