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

Derived

Implements

Inherited Members

Constructors

AsyncResult(AsyncCallback, object)

Initializes a new instance of the Renci.SshNet.Common.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

AsyncWaitHandle

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

public WaitHandle AsyncWaitHandle { get; }

Property Value

WaitHandle

CompletedSynchronously

Gets a value indicating whether the asynchronous operation completed synchronously.

public bool CompletedSynchronously { get; }

Property Value

bool

EndInvokeCalled

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

public bool EndInvokeCalled { get; }

Property Value

bool

IsCompleted

Gets a value indicating whether the asynchronous operation has completed.

public bool IsCompleted { get; }

Property Value

bool

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.