PipelineMessage Class

Definition

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 class PipelineMessage : IDisposable
type PipelineMessage = class
    interface IDisposable
Public Class PipelineMessage
Implements IDisposable
Inheritance
PipelineMessage
Implements

Constructors

PipelineMessage(PipelineRequest)

Creates an instance of PipelineMessage with Request set to the provided request.

Properties

BufferResponse

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

CancellationToken

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

NetworkTimeout

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.

Request

Gets the PipelineRequest to send to the service during the call to Send(PipelineMessage).

Response

Gets the PipelineResponse received from the service during the call to Send(PipelineMessage).

ResponseClassifier

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.

Methods

Apply(RequestOptions)

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

Dispose()

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

Dispose(Boolean)

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

ExtractResponse()

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.

SetProperty(Type, Object)

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.

TryGetProperty(Type, Object)

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.

Applies to