Skip to content

Commit 69b9768

Browse files
[AI-FSSDK] [FSSDK-12337] Add experiment type constants to Experiment entity
1 parent 8252026 commit 69b9768

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

OptimizelySDK/Config/DatafileProjectConfig.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ private void Initialize()
462462
}
463463

464464
var experiment = _ExperimentIdMap[experimentId];
465-
if (experiment.Type != "fr")
465+
if (experiment.Type != Experiment.ExperimentTypeFr)
466466
{
467467
continue;
468468
}

OptimizelySDK/Entity/Experiment.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ public class Experiment : ExperimentCore
2323
{
2424
private const string MUTEX_GROUP_POLICY = "random";
2525

26+
public const string ExperimentTypeAb = "ab";
27+
public const string ExperimentTypeMab = "mab";
28+
public const string ExperimentTypeCmab = "cmab";
29+
public const string ExperimentTypeTd = "td";
30+
public const string ExperimentTypeFr = "fr";
31+
2632
/// <summary>
2733
/// Group ID for the experiment
2834
/// </summary>
@@ -50,7 +56,7 @@ public class Experiment : ExperimentCore
5056
!string.IsNullOrEmpty(GroupPolicy) && GroupPolicy == MUTEX_GROUP_POLICY;
5157

5258
/// <summary>
53-
/// Type of the experiment (e.g., "a/b", "feature_rollout", "targeted_delivery", etc.)
59+
/// Type of the experiment (e.g., "ab", "fr", "td", etc.)
5460
/// Optional - old datafiles will not have this field.
5561
/// </summary>
5662
[JsonProperty("type")]

0 commit comments

Comments
 (0)