private async Task <IReadOnlyCollection <Blob> > ListFilesystemsAsync(ListOptions options, CancellationToken cancellationToken) { //todo: paging FilesystemList filesystems = await _api.ListFilesystemsAsync().ConfigureAwait(false); IEnumerable <Blob> result = filesystems.Filesystems .Select(LConvert.ToBlob); if (options.BrowseFilter != null) { result = result.Where(fs => options.BrowseFilter == null || options.BrowseFilter(fs)); } if (options.MaxResults != null) { result = result.Take(options.MaxResults.Value); } return(result.ToList()); }
public async Task <IEnumerable <string> > ListFilesystemsAsync() { FilesystemList list = await _restApi.ListFilesystemsAsync().ConfigureAwait(false); return(list.Filesystems.Select(x => x.Name)); }