-
Notifications
You must be signed in to change notification settings - Fork 126
Expand file tree
/
Copy pathAllocation.cs
More file actions
48 lines (41 loc) · 1.5 KB
/
Allocation.cs
File metadata and controls
48 lines (41 loc) · 1.5 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
41
42
43
44
45
46
47
48
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
//
using System.Collections.Generic;
namespace Microsoft.FeatureManagement
{
/// <summary>
/// The definition of how variants are allocated for a feature.
/// </summary>
public class Allocation
{
/// <summary>
/// The default variant used if the feature is enabled and no variant is assigned.
/// </summary>
public string DefaultWhenEnabled { get; set; }
/// <summary>
/// The default variant used if the feature is disabled.
/// </summary>
public string DefaultWhenDisabled { get; set; }
/// <summary>
/// Describes a mapping of user ids to variants.
/// </summary>
public IEnumerable<UserAllocation> User { get; set; }
/// <summary>
/// Describes a mapping of group names to variants.
/// </summary>
public IEnumerable<GroupAllocation> Group { get; set; }
/// <summary>
/// Allocates percentiles of user base to variants.
/// </summary>
public IEnumerable<PercentileAllocation> Percentile { get; set; }
/// <summary>
/// Describes a mapping of contextual filters to variants.
/// </summary>
public IEnumerable<ContextualFilterAllocation> AllocatedFor { get; set; }
/// <summary>
/// Maps users to the same percentile across multiple feature flags.
/// </summary>
public string Seed { get; set; }
}
}