<PackageReference Include="SSH.NET" Version="2024.1.0" />

AsyncResult

public abstract class AsyncResult : IAsyncResult
Base class to encapsulates the results of an asynchronous operation.
public object AsyncState { get; }

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

public WaitHandle AsyncWaitHandle { get; }

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

public bool CompletedSynchronously { get; }

Gets a value indicating whether the asynchronous operation completed synchronously.

public bool EndInvokeCalled { get; }

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

public bool IsCompleted { get; }

Gets a value indicating whether the asynchronous operation has completed.

protected AsyncResult(AsyncCallback asyncCallback, object state)

Initializes a new instance of the AsyncResult class.

public void SetAsCompleted(Exception exception, bool completedSynchronously)

Marks asynchronous operation as completed.