public IEnumerable<FileInfo> EndSynchronizeDirectories(IAsyncResult asyncResult)
{
var ar = asyncResult as SftpSynchronizeDirectoriesAsyncResult;
if (ar == null || ar.EndInvokeCalled)
throw new ArgumentException("Either the IAsyncResult object did not come from the corresponding async method on this type, or EndExecute was called multiple times with the same IAsyncResult.");
// Wait for operation to complete, then return result or throw exception
return ar.EndInvoke();
}