语言

你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。

ClientPipeline.SendAsync Method

Definition

Overloads

Name Description
SendAsync(PipelineMessage)

Send the provided PipelineMessage.

SendAsync(PipelineMessage, CancellationToken)

Send the provided PipelineMessage using the specified cancellation token.

SendAsync(PipelineMessage)

Source:
ClientPipeline.cs
Source:
ClientPipeline.cs

Send the provided PipelineMessage.

public System.Threading.Tasks.ValueTask SendAsync(System.ClientModel.Primitives.PipelineMessage message);
member this.SendAsync : System.ClientModel.Primitives.PipelineMessage -> System.Threading.Tasks.ValueTask
Public Function SendAsync (message As PipelineMessage) As ValueTask

Parameters

message
PipelineMessage

The PipelineMessage to send.

Returns

Exceptions

Thrown if an error other than the service responding with an error response occurred while sending the HTTP request.

Remarks

All necessary values on Request should be set prior to calling Send(PipelineMessage). After the method returns, Response will be populated with the details of the service response.

Applies to

SendAsync(PipelineMessage, CancellationToken)

Source:
ClientPipeline.cs

Send the provided PipelineMessage using the specified cancellation token.

public System.Threading.Tasks.ValueTask SendAsync(System.ClientModel.Primitives.PipelineMessage message, System.Threading.CancellationToken cancellationToken);
member this.SendAsync : System.ClientModel.Primitives.PipelineMessage * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
Public Function SendAsync (message As PipelineMessage, cancellationToken As CancellationToken) As ValueTask

Parameters

message
PipelineMessage

The PipelineMessage to send.

cancellationToken
CancellationToken

The CancellationToken to use instead of the message's current cancellation token.

Returns

A task representing the asynchronous send operation.

Exceptions

Thrown if an error other than the service responding with an error response occurred while sending the HTTP request.

Remarks

All necessary values on Request should be set prior to calling this method. After the method returns, Response will be populated with the details of the service response. The supplied token replaces CancellationToken, including when it is None. It is not combined with the previous token. Other options already applied to the message are preserved, and the original RequestOptions instance is not modified.

Applies to