-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
BlobOpenReadOptions.cs
52 lines (45 loc) · 1.83 KB
/
BlobOpenReadOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using Azure.Storage.Blobs.Specialized;
namespace Azure.Storage.Blobs.Models
{
/// <summary>
/// Optional parameters for <see cref="BlobBaseClient.OpenReadAsync(BlobOpenReadOptions, System.Threading.CancellationToken)"/>
/// </summary>
public class BlobOpenReadOptions
{
/// <summary>
/// The position within the blob to begin the stream.
/// Defaults to the beginning of the blob.
/// </summary>
public long Position { get; set; }
/// <summary>
/// The buffer size to use when the stream downloads parts
/// of the blob. Defaults to 4 MB.
/// </summary>
public int? BufferSize { get; set; }
/// <summary>
/// Optional <see cref="BlobRequestConditions"/> to add conditions on
/// the download of the blob.
/// </summary>
public BlobRequestConditions Conditions { get; set; }
/// <summary>
/// Optional override settings for this client's <see cref="BlobClientOptions.TransferValidation"/> settings.
/// This operation does not allow <see cref="DownloadTransferValidationOptions.AutoValidateChecksum"/>
/// to be set false.
/// </summary>
public DownloadTransferValidationOptions TransferValidation { get; set; }
internal bool AllowModifications { get; }
/// <summary>
/// Constructor.
/// </summary>
/// <param name="allowModifications">
/// If false, a <see cref="RequestFailedException"/> will be thrown if the blob is modified while
/// it is being read from.
/// </param>
public BlobOpenReadOptions(bool allowModifications)
{
AllowModifications = allowModifications;
}
}
}