-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
SettingSelector.cs
83 lines (72 loc) · 3.67 KB
/
SettingSelector.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Threading;
namespace Azure.Data.AppConfiguration
{
/// <summary>
/// <para><see cref="SettingSelector"/> is a set of options that allows selecting
/// a filtered set of <see cref="ConfigurationSetting"/> entities from the
/// configuration store, and optionally allows indicating which fields of
/// each setting to retrieve.</para>
/// <para>Literals or filters may be specified for keys and labels.</para>
/// <para>For more information, <see href="https://docs.microsoft.com/azure/azure-app-configuration/rest-api-keys#filtering">Filtering</see>.</para>
/// </summary>
public class SettingSelector
{
/// <summary>
/// A wildcard that matches any key or any label when passed as a filter
/// to Keys or Labels.
/// </summary>
public static readonly string Any = "*";
/// <summary>
/// Key filter that will be used to select a set of <see cref="ConfigurationSetting"/> entities.
/// </summary>
/// <remarks>See the documentation for this client library for details on the format of filter expressions.</remarks>
public string KeyFilter { get; set; }
/// <summary>
/// Label filter that will be used to select a set of <see cref="ConfigurationSetting"/> entities.
/// </summary>
/// <remarks>See the documentation for this client library for details on the format of filter expressions.</remarks>
public string LabelFilter { get; set; }
/// <summary>
/// The fields of the <see cref="ConfigurationSetting"/> to retrieve for each setting in the retrieved group.
/// </summary>
public SettingFields Fields { get; set; } = SettingFields.All;
/// <summary>
/// Indicates the point in time in the revision history of the selected <see cref="ConfigurationSetting"/> entities to retrieve.
/// If set, all properties of the <see cref="ConfigurationSetting"/> entities in the returned group will be exactly what they
/// were at this time.
/// </summary>
public DateTimeOffset? AcceptDateTime { get; set; }
/// <summary>
/// The match conditions of <see cref="ConfigurationClient.GetConfigurationSettings(SettingSelector, CancellationToken)"/>
/// requests. Conditions are applied to pages one by one in the order specified.
/// </summary>
public IList<MatchConditions> MatchConditions { get; } = new ChangeTrackingList<MatchConditions>();
/// <summary>
/// Creates a default <see cref="SettingSelector"/> that will retrieve all <see cref="ConfigurationSetting"/> entities in the configuration store.
/// </summary>
public SettingSelector() { }
#region nobody wants to see these
/// <summary>
/// Check if two SettingSelector instances are equal.
/// </summary>
/// <param name="obj">The instance to compare to.</param>
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object obj) => base.Equals(obj);
/// <summary>
/// Get a hash code for the SettingSelector.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => base.GetHashCode();
/// <summary>
/// Creates a string in reference to the SettingSelector.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString() => base.ToString();
#endregion
}
}