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

PipelineMessage

public class PipelineMessage : IDisposable
Represents an HTTP message that can be sent from a ClientPipeline. Request holds the request sent to the cloud service, and Response holds the response received from the service.
public bool BufferResponse { get; set; }

Gets or sets the value indicating whether the response should be buffered in-memory by the pipeline. Defaults to true.

public CancellationToken CancellationToken { get; protected set; }

Gets or sets the CancellationToken used for the duration of the call to Send.

public TimeSpan? NetworkTimeout { get; set; }

Gets or sets the network timeout value for this message. If null, the value set on the client's options will be used. Defaults to null.

public PipelineRequest Request { get; }

Gets the PipelineRequest to send to the service during the call to Send.

public PipelineResponse Response { get; protected set; }

Gets the PipelineResponse received from the service during the call to Send.

Gets or sets the PipelineMessageClassifier used by the ClientPipeline to determine whether the response received from the service is considered an error and populate the IsError on Response. This property is intended to be set in a client's service method to a a PipelineMessageClassifier that classifies responses as success responses based on the service API's published success codes. Setting this value outside the service method will override the client-specified classifier and may result in undesired behavior.

public void Apply(RequestOptions options)

Apply the options from the provided RequestOptions to this PipelineMessage instance.

public void Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

protected virtual void Dispose(bool disposing)

Releases the unmanaged resources used by the PipelineMessage and optionally disposes of the managed resources.

Returns the value of the Response property and transfers dispose ownership of the response to the caller. After calling this method, the Response property will be null and the caller will be responsible for disposing the returned value, which may hold a live network stream.

public void SetProperty(Type key, object value)

Set a property in the property bag for this PipelineMessage instance. Message properties are used to govern the behavior of specific policies in the ClientPipeline. Please refer to documentation for a specific PipelinePolicy to understand what properties it supports.

public bool TryGetProperty(Type key, out object value)

Attempts to get a property from the property bag for this PipelineMessage instance. Message properties are used to govern the behavior of specific policies in the ClientPipeline. Please refer to documentation for a specific PipelinePolicy to understand what properties it supports.