public void FixSettingBounds()
{
this.ConfigFileVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
if (string.IsNullOrEmpty(this.DisplayCurrency)
|| StringHelper.IsNullOrWhiteSpace(this.DisplayCurrency)) {
this.DisplayCurrency = "USD";
}
if (this.SwitchMinSecondsFixed <= 0) {
this.SwitchMinSecondsFixed = 90;
}
if (this.SwitchMinSecondsDynamic <= 0) {
this.SwitchMinSecondsDynamic = 30;
}
if (this.SwitchMinSecondsAMD <= 0) {
this.SwitchMinSecondsAMD = 60;
}
if (this.MinerAPIQueryInterval <= 0) {
this.MinerAPIQueryInterval = 5;
}
if (this.MinerRestartDelayMS <= 0) {
this.MinerRestartDelayMS = 500;
}
if (this.MinIdleSeconds <= 0) {
this.MinIdleSeconds = 60;
}
if (this.LogMaxFileSize <= 0) {
this.LogMaxFileSize = 1048576;
}
// check port start number, leave about 2000 ports pool size, huge yea!
if (this.ApiBindPortPoolStart > (65535 - 2000)) {
this.ApiBindPortPoolStart = 5100;
}
if (this.BenchmarkTimeLimits == null) {
this.BenchmarkTimeLimits = new BenchmarkTimeLimitsConfig();
}
if (this.DeviceDetection == null) {
this.DeviceDetection = new DeviceDetectionConfig();
}
if (this.LastDevicesSettup == null) {
this.LastDevicesSettup = new List<ComputeDeviceConfig>();
}
}