<PackageReference Include="SSH.NET" Version="2016.0.0-beta1" />

AsyncResult<TResult>

public abstract class AsyncResult<TResult> : AsyncResult
Base class to encapsulates the results of an asynchronous operation that returns result.
using System; namespace Renci.SshNet.Common { public abstract class AsyncResult<TResult> : AsyncResult { private TResult _result; protected AsyncResult(AsyncCallback asyncCallback, object state) : base(asyncCallback, state) { } public void SetAsCompleted(TResult result, bool completedSynchronously) { _result = result; SetAsCompleted(null, completedSynchronously); } public new TResult EndInvoke() { base.EndInvoke(); return _result; } } }