1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-14 01:42:55 +00:00

Support too large numbers for long value in NumberStringConverter, fall back to string

This commit is contained in:
JKorf
2024-08-02 12:07:15 +02:00
parent 27597bc994
commit ca9a711f22
3 changed files with 15 additions and 3 deletions
@@ -357,6 +357,13 @@ namespace CryptoExchange.Net.Testing.Comparers
if (time != DateTimeConverter.ParseFromString(jsonValue.Value<string>()!))
throw new Exception($"{method}: {property} not equal: {jsonValue.Value<string>()} vs {time}");
}
else if (objectValue is bool bl)
{
if (bl && jsonValue.Value<string>() != "1")
throw new Exception($"{method}: {property} not equal: {jsonValue.Value<string>()} vs {bl}");
if (!bl && jsonValue.Value<string>() != "0")
throw new Exception($"{method}: {property} not equal: {jsonValue.Value<string>()} vs {bl}");
}
else if (propertyType.IsEnum || Nullable.GetUnderlyingType(propertyType)?.IsEnum == true)
{
// TODO enum comparing