private void InitFromAppConfig() { Rollbar.NetFramework.RollbarConfigSection config = Rollbar.NetFramework.RollbarConfigSection.GetConfiguration(); if (config == null) { return; } if (!string.IsNullOrWhiteSpace(config.AccessToken)) { this.AccessToken = config.AccessToken; } if (!string.IsNullOrWhiteSpace(config.Environment)) { this.Environment = config.Environment; } if (config.Enabled.HasValue) { this.Enabled = config.Enabled.Value; } if (config.MaxReportsPerMinute.HasValue) { this.MaxReportsPerMinute = config.MaxReportsPerMinute.Value; } if (config.ReportingQueueDepth.HasValue) { this.ReportingQueueDepth = config.ReportingQueueDepth.Value; } if (config.LogLevel.HasValue) { this.LogLevel = config.LogLevel.Value; } if (config.ScrubFields != null && config.ScrubFields.Length > 0) { this.ScrubFields = config.ScrubFields; } if (!string.IsNullOrWhiteSpace(config.EndPoint)) { this.EndPoint = config.EndPoint; } if (!string.IsNullOrWhiteSpace(config.ProxyAddress)) { this.ProxyAddress = config.ProxyAddress; } }
private void InitFromAppConfig() { Rollbar.NetFramework.RollbarConfigSection config = Rollbar.NetFramework.RollbarConfigSection.GetConfiguration(); if (config == null) { return; } if (!string.IsNullOrWhiteSpace(config.AccessToken)) { this.AccessToken = config.AccessToken; } if (!string.IsNullOrWhiteSpace(config.Environment)) { this.Environment = config.Environment; } if (config.Enabled.HasValue) { this.Enabled = config.Enabled.Value; } if (config.MaxReportsPerMinute.HasValue) { this.MaxReportsPerMinute = config.MaxReportsPerMinute.Value; } if (config.ReportingQueueDepth.HasValue) { this.ReportingQueueDepth = config.ReportingQueueDepth.Value; } if (config.LogLevel.HasValue) { this.LogLevel = config.LogLevel.Value; } if (config.ScrubFields != null && config.ScrubFields.Length > 0) { this.ScrubFields = string.IsNullOrEmpty(config.ScrubFields) ? new string[0] : config.ScrubFields.Split(listValueSplitters, StringSplitOptions.RemoveEmptyEntries); } if (config.ScrubWhitelistFields != null && config.ScrubWhitelistFields.Length > 0) { this.ScrubWhitelistFields = string.IsNullOrEmpty(config.ScrubWhitelistFields) ? new string[0] : config.ScrubWhitelistFields.Split(listValueSplitters, StringSplitOptions.RemoveEmptyEntries); } if (!string.IsNullOrWhiteSpace(config.EndPoint)) { this.EndPoint = config.EndPoint; } if (!string.IsNullOrWhiteSpace(config.ProxyAddress)) { this.ProxyAddress = config.ProxyAddress; } if (config.PersonDataCollectionPolicies.HasValue) { this.PersonDataCollectionPolicies = config.PersonDataCollectionPolicies.Value; } if (config.IpAddressCollectionPolicy.HasValue) { this.IpAddressCollectionPolicy = config.IpAddressCollectionPolicy.Value; } }