Method FindAsync
FindAsync(FilterDefinition<GridFSFileInfo<TFileId>>, GridFSFindOptions<TFileId>, CancellationToken)
Finds matching entries from the files collection.
public Task<IAsyncCursor<GridFSFileInfo<TFileId>>> FindAsync(FilterDefinition<GridFSFileInfo<TFileId>> filter, GridFSFindOptions<TFileId> options = null, CancellationToken cancellationToken = default)
Parameters
filter
FilterDefinition<GridFSFileInfo<TFileId>>The filter.
options
GridFSFindOptions<TFileId>The options.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<IAsyncCursor<GridFSFileInfo<TFileId>>>
A Task whose result is a cursor of files collection documents.