Bewerken

Share via


HttpContent.LoadIntoBufferAsync Method

Definition

Serialize the HTTP content to a memory buffer as an asynchronous operation.

Overloads

LoadIntoBufferAsync(Int64, CancellationToken)

Serialize the HTTP content to a memory buffer as an asynchronous operation.

LoadIntoBufferAsync(CancellationToken)

Serialize the HTTP content to a memory buffer as an asynchronous operation.

LoadIntoBufferAsync(Int64)

Serialize the HTTP content to a memory buffer as an asynchronous operation.

LoadIntoBufferAsync()

Serialize the HTTP content to a memory buffer as an asynchronous operation.

Remarks

This operation will not block.

LoadIntoBufferAsync(Int64, CancellationToken)

Serialize the HTTP content to a memory buffer as an asynchronous operation.

public:
 System::Threading::Tasks::Task ^ LoadIntoBufferAsync(long maxBufferSize, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task LoadIntoBufferAsync (long maxBufferSize, System.Threading.CancellationToken cancellationToken);
member this.LoadIntoBufferAsync : int64 * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function LoadIntoBufferAsync (maxBufferSize As Long, cancellationToken As CancellationToken) As Task

Parameters

maxBufferSize
Int64

The maximum size, in bytes, of the buffer to use.

cancellationToken
CancellationToken

The cancellation token to cancel the operation.

Returns

The task object representing the asynchronous operation.

Exceptions

The cancellation token was canceled. This exception is stored into the returned task.

The object has already been disposed.

Remarks

This operation will not block. The returned Task object will complete after all of the content has been serialized to the memory buffer.

After content is serialized to a memory buffer, calls to one of the CopyToAsync(Stream) methods will copy the content of the memory buffer to the target stream.

Applies to

LoadIntoBufferAsync(CancellationToken)

Serialize the HTTP content to a memory buffer as an asynchronous operation.

public:
 System::Threading::Tasks::Task ^ LoadIntoBufferAsync(System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task LoadIntoBufferAsync (System.Threading.CancellationToken cancellationToken);
member this.LoadIntoBufferAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function LoadIntoBufferAsync (cancellationToken As CancellationToken) As Task

Parameters

cancellationToken
CancellationToken

The cancellation token to cancel the operation.

Returns

The task object representing the asynchronous operation.

Exceptions

The cancellation token was canceled. This exception is stored into the returned task.

The object has already been disposed.

Remarks

This operation will not block. The returned Task object will complete after all of the content has been serialized to the memory buffer.

After content is serialized to a memory buffer, calls to one of the CopyToAsync(Stream) methods will copy the content of the memory buffer to the target stream.

Applies to

LoadIntoBufferAsync(Int64)

Source:
HttpContent.cs
Source:
HttpContent.cs
Source:
HttpContent.cs

Serialize the HTTP content to a memory buffer as an asynchronous operation.

public:
 System::Threading::Tasks::Task ^ LoadIntoBufferAsync(long maxBufferSize);
public System.Threading.Tasks.Task LoadIntoBufferAsync (long maxBufferSize);
member this.LoadIntoBufferAsync : int64 -> System.Threading.Tasks.Task
Public Function LoadIntoBufferAsync (maxBufferSize As Long) As Task

Parameters

maxBufferSize
Int64

The maximum size, in bytes, of the buffer to use.

Returns

The task object representing the asynchronous operation.

Remarks

This operation will not block. The returned Task object will complete after all of the content has been serialized to the memory buffer.

After content is serialized to a memory buffer, calls to one of the CopyToAsync methods will copy the content of the memory buffer to the target stream.

If the content exceeds the value passed in the maxBufferSize parameter, an exception is thrown.

Applies to

LoadIntoBufferAsync()

Source:
HttpContent.cs
Source:
HttpContent.cs
Source:
HttpContent.cs

Serialize the HTTP content to a memory buffer as an asynchronous operation.

public:
 System::Threading::Tasks::Task ^ LoadIntoBufferAsync();
public System.Threading.Tasks.Task LoadIntoBufferAsync ();
member this.LoadIntoBufferAsync : unit -> System.Threading.Tasks.Task
Public Function LoadIntoBufferAsync () As Task

Returns

The task object representing the asynchronous operation.

Remarks

This operation will not block. The returned Task object will complete after all of the content has been serialized to the memory buffer.

After content is serialized to a memory buffer, calls to one of the CopyToAsync methods will copy the content of the memory buffer to the target stream.

Applies to