แก้ไข

แชร์ผ่าน


NegotiateStream.DisposeAsync Method

Definition

Asynchronously releases the unmanaged and managed resources used by the NegotiateStream.

public:
 override System::Threading::Tasks::ValueTask DisposeAsync();
public override System.Threading.Tasks.ValueTask DisposeAsync ();
override this.DisposeAsync : unit -> System.Threading.Tasks.ValueTask
Public Overrides Function DisposeAsync () As ValueTask

Returns

A task that represents the asynchronous dispose operation.

Remarks

This method enables you to perform a resource-intensive dispose operation without blocking the main thread.

This method also disposes the inner stream when LeaveInnerStreamOpen is false; otherwise, the inner stream is just flushed.

Calling DisposeAsync allows the resources used by the NegotiateStream to be reallocated for other purposes. For more information, see Cleaning Up Unmanaged Resources.

Applies to