mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2026-04-12 16:13:12 +00:00
wip
This commit is contained in:
parent
6dbc84e6fc
commit
5bf89897e8
@ -23,7 +23,7 @@ namespace CryptoExchange.Net.UnitTests.Implementations
|
|||||||
{ }
|
{ }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the CryptoCom environment by name
|
/// Get the environment by name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static TestEnvironment? GetEnvironmentByName(string? name)
|
public static TestEnvironment? GetEnvironmentByName(string? name)
|
||||||
=> name switch
|
=> name switch
|
||||||
|
|||||||
@ -18,7 +18,7 @@ namespace CryptoExchange.Net.UnitTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void AddingBasicNullValue_ThrowExecption()
|
public void AddingBasicNullValue_ThrowsException()
|
||||||
{
|
{
|
||||||
var parameters = new ParameterCollection();
|
var parameters = new ParameterCollection();
|
||||||
Assert.Throws<ArgumentNullException>(() => parameters.Add("test", null!));
|
Assert.Throws<ArgumentNullException>(() => parameters.Add("test", null!));
|
||||||
|
|||||||
@ -230,7 +230,7 @@ namespace CryptoExchange.Net.Converters.SystemTextJson
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Try to get the enum value based on the string value using the Utf8JsonReader's ValueTextEquals method.
|
/// Try to get the enum value based on the string value using the Utf8JsonReader's ValueTextEquals method.
|
||||||
/// This is an optimization to avoid string allocations when possible, but can only match case insensitively
|
/// This is an optimization to avoid string allocations when possible, but can only match case sensitively
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private static T? GetValueOptimistic(ref Utf8JsonReader reader)
|
private static T? GetValueOptimistic(ref Utf8JsonReader reader)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -62,7 +62,7 @@ namespace CryptoExchange.Net.Sockets
|
|||||||
|
|
||||||
private MessageRouter _router;
|
private MessageRouter _router;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Router for this subscription
|
/// Router for this query
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public MessageRouter MessageRouter
|
public MessageRouter MessageRouter
|
||||||
{
|
{
|
||||||
@ -208,12 +208,14 @@ namespace CryptoExchange.Net.Sockets
|
|||||||
if (CurrentResponses == RequiredResponses)
|
if (CurrentResponses == RequiredResponses)
|
||||||
Response = message;
|
Response = message;
|
||||||
|
|
||||||
|
var handled = false;
|
||||||
if (Result?.Success != false)
|
if (Result?.Success != false)
|
||||||
{
|
{
|
||||||
// If an error result is already set don't override that
|
// If an error result is already set don't override that
|
||||||
MessageRouter.Handle(typeIdentifier, topicFilter, connection, receiveTime, originalData, message, out var result);
|
MessageRouter.Handle(typeIdentifier, topicFilter, connection, receiveTime, originalData, message, out var result);
|
||||||
Result = result;
|
Result = result;
|
||||||
if (Result == null)
|
handled = Result != null;
|
||||||
|
if (!handled)
|
||||||
// Null from Handle means it wasn't actually for this query
|
// Null from Handle means it wasn't actually for this query
|
||||||
CurrentResponses -= 1;
|
CurrentResponses -= 1;
|
||||||
}
|
}
|
||||||
@ -225,7 +227,7 @@ namespace CryptoExchange.Net.Sockets
|
|||||||
OnComplete?.Invoke();
|
OnComplete?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return handled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user