Exemplo n.º 1
0
 /// <summary>
 /// Downloads a file stored in GridFS and returns it as a byte array.
 /// </summary>
 /// <param name="id">The file id.</param>
 /// <param name="options">The options.</param>
 /// <param name="cancellationToken">The cancellation token.</param>
 /// <returns>A byte array containing the contents of the file stored in GridFS.</returns>
 public byte[] DownloadAsBytes(BsonValue id, GridFSDownloadOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(_bsonValueBucket.DownloadAsBytes(id, options, cancellationToken));
 }