Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added depreciation warning on Optimizelyconfig.ExperimentsMap field #276

Merged
merged 3 commits into from
Aug 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions OptimizelySDK/OptlyConfig/OptimizelyConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

using Newtonsoft.Json;
using System;
using System.Collections.Generic;

namespace OptimizelySDK.OptlyConfig
Expand All @@ -27,7 +28,15 @@ public class OptimizelyConfig
public OptimizelyEvent[] Events { get; private set; }
public OptimizelyAudience[] Audiences { get; private set; }
public OptimizelyAttribute[] Attributes { get; private set; }

/// <summary>
/// This experimentsMap is for experiments of legacy projects only.
/// For flag projects, experiment keys are not guaranteed to be unique
/// across multiple flags, so this map may not include all experiments
/// when keys conflict.
/// </summary>
public IDictionary<string, OptimizelyExperiment> ExperimentsMap { get; private set; }

public IDictionary<string, OptimizelyFeature> FeaturesMap { get; private set; }

private string _datafile;
Expand Down
3 changes: 3 additions & 0 deletions OptimizelySDK/OptlyConfig/OptimizelyFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections.Generic;

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

public List<OptimizelyExperiment> ExperimentRules { get; private set; }
public List<OptimizelyExperiment> DeliveryRules { get; private set; }

[Obsolete("Use experimentRules and deliveryRules.")]
public IDictionary<string, OptimizelyExperiment> ExperimentsMap { get; private set; }
public IDictionary<string, OptimizelyVariable> VariablesMap { get; private set; }

Expand Down