C# Class System.IO.FileStream.AsyncCopyToAwaitable

Used by CopyToAsync to enable awaiting the result of an overlapped I/O operation with minimal overhead.
Inheritance: ICriticalNotifyCompletion
显示文件 Open project: dotnet/corefx

Private Properties

Property Type Description
AsyncCopyToAwaitable System.Buffers
IOCallback void
MarkCompleted void
ResetForNextOperation void

Public Methods

Method Description
GetAwaiter ( ) : AsyncCopyToAwaitable
GetResult ( ) : void
OnCompleted ( Action continuation ) : void
UnsafeOnCompleted ( Action continuation ) : void

Private Methods

Method Description
AsyncCopyToAwaitable ( FileStream fileStream ) : System.Buffers

Initialize the awaitable.

IOCallback ( uint errorCode, uint numBytes, NativeOverlapped pOVERLAP ) : void

Overlapped callback: store the results, then invoke the continuation delegate.

MarkCompleted ( ) : void

Called when it's known that the I/O callback for an operation will not be invoked but we'll still be awaiting the awaitable.

ResetForNextOperation ( ) : void

Reset state to prepare for the next read operation.

Method Details

GetAwaiter() public method

public GetAwaiter ( ) : AsyncCopyToAwaitable
return AsyncCopyToAwaitable

GetResult() public method

public GetResult ( ) : void
return void

OnCompleted() public method

public OnCompleted ( Action continuation ) : void
continuation Action
return void

UnsafeOnCompleted() public method

public UnsafeOnCompleted ( Action continuation ) : void
continuation Action
return void