-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
BlobQueryOptions.cs
67 lines (59 loc) · 1.88 KB
/
BlobQueryOptions.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using Azure.Storage.Blobs.Specialized;
using System.Collections.Generic;
using System.Text;
namespace Azure.Storage.Blobs.Models
{
/// <summary>
/// Optional parameters for <see cref="BlockBlobClient.QueryAsync(string, BlobQueryOptions, System.Threading.CancellationToken)"/>.
/// </summary>
public class BlobQueryOptions
{
/// <summary>
/// Optional input text configuration.
/// </summary>
public BlobQueryTextOptions InputTextConfiguration { get; set; }
/// <summary>
/// Optional output text configuration.
/// </summary>
public BlobQueryTextOptions OutputTextConfiguration { get; set; }
/// <summary>
/// Lock for ErrorHandler add and remove.
/// </summary>
private readonly object _objectLock = new object();
/// <summary>
/// Optional callback for error handling.
/// </summary>
public event Action<BlobQueryError> ErrorHandler
{
add
{
lock (_objectLock)
{
_errorHandler += value;
}
}
remove
{
lock (_objectLock)
{
_errorHandler -= value;
}
}
}
/// <summary>
/// Internal error handler.
/// </summary>
internal Action<BlobQueryError> _errorHandler;
/// <summary>
/// Optional <see cref="BlobRequestConditions"/> to add conditions on the query.
/// </summary>
public BlobRequestConditions Conditions { get; set; }
/// <summary>
/// Optional progress handler.
/// </summary>
public IProgress<long> ProgressHandler { get; set; }
}
}