mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2026-04-08 02:31:11 +00:00
wip
This commit is contained in:
parent
7c34b62866
commit
0d3ccf25a7
@ -335,7 +335,9 @@ namespace CryptoExchange.Net.Converters.SystemTextJson
|
||||
var mappingStringToEnum = new List<EnumMapping>();
|
||||
var mappingEnumToString = new Dictionary<T, string>();
|
||||
|
||||
#pragma warning disable IL2080
|
||||
var enumMembers = _enumType.GetFields();
|
||||
#pragma warning restore IL2080
|
||||
foreach (var member in enumMembers)
|
||||
{
|
||||
var maps = member.GetCustomAttributes(typeof(MapAttribute), false);
|
||||
|
||||
@ -25,6 +25,7 @@ namespace CryptoExchange.Net.Sockets.Default.Routing
|
||||
if (!_routeTableEntries.ContainsKey(route.TypeIdentifier))
|
||||
_routeTableEntries.Add(route.TypeIdentifier, new RoutingTableEntry(route.DeserializationType));
|
||||
|
||||
if (!_routeTableEntries[route.TypeIdentifier].Handlers.Contains(entry))
|
||||
_routeTableEntries[route.TypeIdentifier].Handlers.Add(entry);
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,11 +9,8 @@ using CryptoExchange.Net.Sockets.Default.Routing;
|
||||
using CryptoExchange.Net.Sockets.Interfaces;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Net.WebSockets;
|
||||
using System.Text;
|
||||
@ -1153,13 +1150,7 @@ namespace CryptoExchange.Net.Sockets.Default
|
||||
{
|
||||
var updatedList = new List<IMessageProcessor>(_listeners);
|
||||
updatedList.Add(processor);
|
||||
processor.OnMessageRouterUpdated += () =>
|
||||
{
|
||||
BuildRoutingTable();
|
||||
#if DEBUG
|
||||
_logger.LogTrace("MessageRouter updated, new routing table:\r\n" + _routeTable.ToString());
|
||||
#endif
|
||||
};
|
||||
processor.OnMessageRouterUpdated += BuildRoutingTable;
|
||||
_listeners = updatedList.AsReadOnly();
|
||||
if (processor.MessageRouter.Routes.Length > 0)
|
||||
{
|
||||
|
||||
@ -22,7 +22,7 @@ namespace CryptoExchange.Net.Sockets.Interfaces
|
||||
/// <summary>
|
||||
/// Event when the message router for this processor has been changed
|
||||
/// </summary>
|
||||
public event Action OnMessageRouterUpdated;
|
||||
public event Action? OnMessageRouterUpdated;
|
||||
/// <summary>
|
||||
/// Handle a message
|
||||
/// </summary>
|
||||
|
||||
@ -48,6 +48,7 @@ namespace CryptoExchange.Net.Testing
|
||||
/// <param name="methodInvoke">Method invocation</param>
|
||||
/// <param name="name">Method name for looking up json test values</param>
|
||||
/// <param name="endpointOptions">Request options</param>
|
||||
/// <param name="validation">Callback to validate the response model</param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="Exception"></exception>
|
||||
public Task ValidateAsync<TResponse>(
|
||||
@ -65,6 +66,7 @@ namespace CryptoExchange.Net.Testing
|
||||
/// <param name="methodInvoke">Method invocation</param>
|
||||
/// <param name="name">Method name for looking up json test values</param>
|
||||
/// <param name="endpointOptions">Request options</param>
|
||||
/// <param name="validation">Callback to validate the response model</param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="Exception"></exception>
|
||||
public async Task ValidateAsync<TResponse, TActualResponse>(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user