1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-21 13:23:07 +00:00

Added net9.0 build target, added KeepAliveTimeout for websocket connections

This commit is contained in:
Jkorf
2024-12-23 14:14:47 +01:00
parent 0be1bb16e3
commit 290be7f5e0
30 changed files with 78 additions and 69 deletions
@@ -27,7 +27,7 @@ namespace CryptoExchange.Net.Converters.SystemTextJson
public override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options)
{
Type converterType = typeof(DateTimeConverterInner<>).MakeGenericType(typeToConvert);
return (JsonConverter)Activator.CreateInstance(converterType);
return (JsonConverter)Activator.CreateInstance(converterType)!;
}
private class DateTimeConverterInner<T> : JsonConverter<T>
@@ -74,7 +74,9 @@ namespace CryptoExchange.Net.Converters.SystemTextJson
public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options)
{
if (value == null)
{
writer.WriteNullValue();
}
else
{
var dtValue = (DateTime)(object)value;