11/*
2- * Copyright 2019-2020 , Optimizely
2+ * Copyright 2019-2021 , Optimizely
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
1414 * limitations under the License.
1515 */
1616
17+ using Newtonsoft . Json ;
1718using System . Collections . Generic ;
1819
1920namespace OptimizelySDK . OptlyConfig
2021{
2122 public class OptimizelyConfig
2223 {
2324 public string Revision { get ; private set ; }
25+ [ JsonProperty ( NullValueHandling = NullValueHandling . Ignore ) ]
26+ public string SDKKey { get ; private set ; }
27+ [ JsonProperty ( NullValueHandling = NullValueHandling . Ignore ) ]
28+ public string EnvironmentKey { get ; private set ; }
2429 public IDictionary < string , OptimizelyExperiment > ExperimentsMap { get ; private set ; }
2530 public IDictionary < string , OptimizelyFeature > FeaturesMap { get ; private set ; }
2631
2732 private string _datafile ;
28-
33+
2934 public OptimizelyConfig ( string revision , IDictionary < string , OptimizelyExperiment > experimentsMap , IDictionary < string , OptimizelyFeature > featuresMap , string datafile = null )
3035 {
3136 Revision = revision ;
@@ -34,6 +39,16 @@ public OptimizelyConfig(string revision, IDictionary<string, OptimizelyExperimen
3439 _datafile = datafile ;
3540 }
3641
42+ public OptimizelyConfig ( string revision , string sdkKey , string environmentKey , IDictionary < string , OptimizelyExperiment > experimentsMap , IDictionary < string , OptimizelyFeature > featuresMap , string datafile = null )
43+ {
44+ Revision = revision ;
45+ SDKKey = sdkKey ;
46+ EnvironmentKey = environmentKey ;
47+ ExperimentsMap = experimentsMap ;
48+ FeaturesMap = featuresMap ;
49+ _datafile = datafile ;
50+ }
51+
3752 /// <summary>
3853 /// Get the datafile associated with OptimizelyConfig.
3954 /// </summary>
0 commit comments