public BeginListDirectory ( string path, AsyncCallback asyncCallback, object state, Action |
||
path | string | The path. |
asyncCallback | AsyncCallback | The method to be called when the asynchronous write operation is completed. |
state | object | A user-provided object that distinguishes this particular asynchronous write request from other requests. |
listCallback | Action |
The list callback. |
리턴 | IAsyncResult |
private async Task<IEnumerable<SftpFile>> ListRemoteDirectoriesAsync(SftpClient client, string remoteFullName) { return await Task.Factory.FromAsync<IEnumerable<SftpFile>>((callback, obj) => client.BeginListDirectory(remoteFullName, callback, obj), client.EndListDirectory, null); }