14
14
namespace Exceptionless {
15
15
public class ExceptionlessConfiguration {
16
16
private const string DEFAULT_SERVER_URL = "https://collector.exceptionless.io" ;
17
+ private const string DEFAULT_CONFIG_SERVER_URL = "https://config.exceptionless.io" ;
17
18
private const string DEFAULT_HEARTBEAT_SERVER_URL = "https://heartbeat.exceptionless.io" ;
18
19
private const string DEFAULT_USER_AGENT = "exceptionless/" + ThisAssembly . AssemblyFileVersion ;
19
20
private const int DEFAULT_SUBMISSION_BATCH_SIZE = 50 ;
20
21
21
22
private readonly IDependencyResolver _resolver ;
22
23
private bool _configLocked ;
23
24
private string _apiKey ;
25
+ private string _configServerUrl ;
24
26
private string _heartbeatServerUrl ;
25
27
private string _serverUrl ;
26
28
private bool _includePrivateInformation ;
@@ -36,6 +38,7 @@ public ExceptionlessConfiguration(IDependencyResolver resolver) {
36
38
throw new ArgumentNullException ( "resolver" ) ;
37
39
38
40
ServerUrl = DEFAULT_SERVER_URL ;
41
+ ConfigServerUrl = DEFAULT_CONFIG_SERVER_URL ;
39
42
HeartbeatServerUrl = DEFAULT_HEARTBEAT_SERVER_URL ;
40
43
UserAgent = DEFAULT_USER_AGENT ;
41
44
SubmissionBatchSize = DEFAULT_SUBMISSION_BATCH_SIZE ;
@@ -78,11 +81,30 @@ public string ServerUrl {
78
81
79
82
_validationResult = null ;
80
83
_serverUrl = value ;
84
+ _configServerUrl = value ;
81
85
_heartbeatServerUrl = value ;
82
86
OnChanged ( ) ;
83
87
}
84
88
}
85
89
90
+ /// <summary>
91
+ /// The server url that all configuration will be retrieved from.
92
+ /// </summary>
93
+ public string ConfigServerUrl {
94
+ get { return _configServerUrl ; }
95
+ set {
96
+ if ( _configServerUrl == value )
97
+ return ;
98
+
99
+ if ( _configLocked )
100
+ throw new ArgumentException ( "ConfigServerUrl can't be changed after the client has been initialized." ) ;
101
+
102
+ _validationResult = null ;
103
+ _configServerUrl = value ;
104
+ OnChanged ( ) ;
105
+ }
106
+ }
107
+
86
108
/// <summary>
87
109
/// The server url that all events will be sent to.
88
110
/// </summary>
@@ -514,6 +536,9 @@ public ValidationResult Validate() {
514
536
if ( String . IsNullOrEmpty ( ServerUrl ) )
515
537
result . Messages . Add ( "ServerUrl is not set." ) ;
516
538
539
+ if ( String . IsNullOrEmpty ( ConfigServerUrl ) )
540
+ result . Messages . Add ( "ConfigServerUrl is not set." ) ;
541
+
517
542
if ( String . IsNullOrEmpty ( HeartbeatServerUrl ) )
518
543
result . Messages . Add ( "HeartbeatServerUrl is not set." ) ;
519
544
0 commit comments