This commit is contained in:
2023-10-15 09:51:56 -07:00
parent 2cd2c2b434
commit cd5ab223c9
75 changed files with 895 additions and 722 deletions

View File

@ -16,8 +16,7 @@ public abstract class Configuration
Binder.Configuration? configuration = configurationSection.Get<Binder.Configuration>();
string json = JsonSerializer.Serialize(configuration, new JsonSerializerOptions() { WriteIndented = true });
result = JsonSerializer.Deserialize<Models.Configuration>(json);
if (result is null)
throw new Exception(json);
if (result is null) throw new Exception(json);
string jsonThis = result.ToString();
if (jsonThis != json)
{
@ -30,11 +29,10 @@ public abstract class Configuration
check = i;
break;
}
if (check is null)
throw new Exception();
if (check is null) throw new Exception();
string a = json[..check.Value].Split(',')[^1];
string b = json[check.Value..].Split(',')[0];
throw new Exception($"{a}{b}");
throw new Exception($"{a}{b}");
}
return result;
}