-
Notifications
You must be signed in to change notification settings - Fork 127
Expand file tree
/
Copy pathFeatureFilterEvaluationContext.cs
More file actions
40 lines (35 loc) · 1.66 KB
/
FeatureFilterEvaluationContext.cs
File metadata and controls
40 lines (35 loc) · 1.66 KB
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
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
//
using Microsoft.Extensions.Configuration;
using System.Threading;
namespace Microsoft.FeatureManagement
{
/// <summary>
/// A context used by <see cref="IFeatureFilter"/> to gain insight into what feature is being evaluated and the parameters needed to check whether the feature should be enabled.
/// </summary>
public class FeatureFilterEvaluationContext
{
/// <summary>
/// The name of the feature being evaluated.
/// </summary>
public string FeatureName { get; set; }
/// <summary>
/// The settings provided for the feature filter to use when evaluating whether the feature should be enabled.
/// </summary>
public IConfiguration Parameters { get; set; }
/// <summary>
/// The settings provided for the feature filter to use when evaluating whether the feature should be enabled. This property takes precedence over <see cref="Settings"/> and <see cref="Parameters"/> if both are provided.
/// </summary>
public object ParametersObject { get; set; }
/// <summary>
/// A settings object, if any, that has been pre-bound from <see cref="Parameters"/>.
/// The settings are made available for <see cref="IFeatureFilter"/>s that implement <see cref="IFilterParametersBinder"/>.
/// </summary>
public object Settings { get; set; }
/// <summary>
/// A cancellation token that can be used to request cancellation of the feature evaluation operation.
/// </summary>
public CancellationToken CancellationToken { get; set; }
}
}