Table of Contents

Class AsyncResult

Namespace
Renci.SshNet.Common
Assembly
Renci.SshNet.dll

Base class to encapsulates the results of an asynchronous operation.

public abstract class AsyncResult : IAsyncResult
Inheritance
AsyncResult
Implements
Derived
Inherited Members

Constructors

AsyncResult(AsyncCallback, object)

Initializes a new instance of the AsyncResult class.

protected AsyncResult(AsyncCallback asyncCallback, object state)

Parameters

asyncCallback AsyncCallback

The async callback.

state object

The state.

Properties

AsyncState

Gets a user-defined object that qualifies or contains information about an asynchronous operation.

public object AsyncState { get; }

Property Value

object

A user-defined object that qualifies or contains information about an asynchronous operation.

AsyncWaitHandle

Gets a WaitHandle that is used to wait for an asynchronous operation to complete.

public WaitHandle AsyncWaitHandle { get; }

Property Value

WaitHandle

A WaitHandle that is used to wait for an asynchronous operation to complete.

CompletedSynchronously

Gets a value indicating whether the asynchronous operation completed synchronously.

public bool CompletedSynchronously { get; }

Property Value

bool

true if the asynchronous operation completed synchronously; otherwise, false.

EndInvokeCalled

Gets a value indicating whether Renci.SshNet.Common.AsyncResult.EndInvoke has been called on the current AsyncResult.

public bool EndInvokeCalled { get; }

Property Value

bool

true if Renci.SshNet.Common.AsyncResult.EndInvoke has been called on the current AsyncResult; otherwise, false.

IsCompleted

Gets a value indicating whether the asynchronous operation has completed.

public bool IsCompleted { get; }

Property Value

bool

true if the operation is complete; otherwise, false.

Methods

SetAsCompleted(Exception, bool)

Marks asynchronous operation as completed.

public void SetAsCompleted(Exception exception, bool completedSynchronously)

Parameters

exception Exception

The exception.

completedSynchronously bool

If set to true, completed synchronously.