1
1
/*
2
- * Copyright 2019-2020 , Optimizely
2
+ * Copyright 2019-2021 , Optimizely
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
14
14
* limitations under the License.
15
15
*/
16
16
17
+ using Newtonsoft . Json ;
17
18
using System . Collections . Generic ;
18
19
19
20
namespace OptimizelySDK . OptlyConfig
20
21
{
21
22
public class OptimizelyConfig
22
23
{
23
24
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 ; }
24
29
public IDictionary < string , OptimizelyExperiment > ExperimentsMap { get ; private set ; }
25
30
public IDictionary < string , OptimizelyFeature > FeaturesMap { get ; private set ; }
26
31
27
32
private string _datafile ;
28
-
33
+
29
34
public OptimizelyConfig ( string revision , IDictionary < string , OptimizelyExperiment > experimentsMap , IDictionary < string , OptimizelyFeature > featuresMap , string datafile = null )
30
35
{
31
36
Revision = revision ;
@@ -34,6 +39,16 @@ public OptimizelyConfig(string revision, IDictionary<string, OptimizelyExperimen
34
39
_datafile = datafile ;
35
40
}
36
41
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
+
37
52
/// <summary>
38
53
/// Get the datafile associated with OptimizelyConfig.
39
54
/// </summary>
0 commit comments