Azure / azure-data-lake-store-net

Azure Data Lake Store .Net SDK
MIT License
18 stars 24 forks source link

Cancellation token is ignored in AdlsClient.EnumerateDirectory #25

Closed andreidarabanov closed 5 years ago

andreidarabanov commented 5 years ago

Cancellation token cancelToken is ignored by EnumerateDirectory implementation, although the underlying implementation of Core.ListStatusAsync supports it.

I would propose passing the token down to the REST call wrapper.

internal IEnumerable<DirectoryEntry> EnumerateDirectory(string path, int maxEntries, string listAfter, string listBefore, UserGroupRepresentation userIdFormat = UserGroupRepresentation.ObjectID, CancellationToken cancelToken = default(CancellationToken))
{
    if (string.IsNullOrEmpty(path))
    {
        throw new ArgumentException("Path is null");
    }
    return new FileStatusOutput<DirectoryEntry>(listBefore, listAfter, maxEntries, userIdFormat, this, path);
}
rahuldutta90 commented 5 years ago

Acknowledge. Will fix it in next release.

rahuldutta90 commented 5 years ago

Fixed it in the recent release.