Skip to content

Commit 444b53d

Browse files
authored
Added depreciation warning on Optimizelyconfig.ExperimentsMap field (#276)
* Added depreciation warning on Optimizelyconfig.ExperimentsMap field
1 parent 865dab3 commit 444b53d

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

OptimizelySDK/OptlyConfig/OptimizelyConfig.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
using Newtonsoft.Json;
18+
using System;
1819
using System.Collections.Generic;
1920

2021
namespace OptimizelySDK.OptlyConfig
@@ -27,7 +28,15 @@ public class OptimizelyConfig
2728
public OptimizelyEvent[] Events { get; private set; }
2829
public OptimizelyAudience[] Audiences { get; private set; }
2930
public OptimizelyAttribute[] Attributes { get; private set; }
31+
32+
/// <summary>
33+
/// This experimentsMap is for experiments of legacy projects only.
34+
/// For flag projects, experiment keys are not guaranteed to be unique
35+
/// across multiple flags, so this map may not include all experiments
36+
/// when keys conflict.
37+
/// </summary>
3038
public IDictionary<string, OptimizelyExperiment> ExperimentsMap { get; private set; }
39+
3140
public IDictionary<string, OptimizelyFeature> FeaturesMap { get; private set; }
3241

3342
private string _datafile;

OptimizelySDK/OptlyConfig/OptimizelyFeature.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
using System;
1617
using System.Collections.Generic;
1718

1819
namespace OptimizelySDK.OptlyConfig
@@ -22,6 +23,8 @@ public class OptimizelyFeature : Entity.IdKeyEntity
2223

2324
public List<OptimizelyExperiment> ExperimentRules { get; private set; }
2425
public List<OptimizelyExperiment> DeliveryRules { get; private set; }
26+
27+
[Obsolete("Use experimentRules and deliveryRules.")]
2528
public IDictionary<string, OptimizelyExperiment> ExperimentsMap { get; private set; }
2629
public IDictionary<string, OptimizelyVariable> VariablesMap { get; private set; }
2730

0 commit comments

Comments
 (0)