mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-06-08 08:26:20 +00:00
Small changes
This commit is contained in:
parent
6d0120d564
commit
0818c6277b
@ -122,7 +122,7 @@ namespace CryptoExchange.Net.UnitTests.TestImplementations
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override AuthenticationProvider CreateAuthenticationProvider(ApiCredentials credentials)
|
protected override AuthenticationProvider CreateAuthenticationProvider(ApiCredentials credentials)
|
||||||
=> new TestAuthProvider(credentials);
|
=> new TestAuthProvider(credentials);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ namespace CryptoExchange.Net.UnitTests.TestImplementations
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override AuthenticationProvider CreateAuthenticationProvider(ApiCredentials credentials)
|
protected override AuthenticationProvider CreateAuthenticationProvider(ApiCredentials credentials)
|
||||||
=> new TestAuthProvider(credentials);
|
=> new TestAuthProvider(credentials);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ namespace CryptoExchange.Net.UnitTests.TestImplementations
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override AuthenticationProvider CreateAuthenticationProvider(ApiCredentials credentials)
|
protected override AuthenticationProvider CreateAuthenticationProvider(ApiCredentials credentials)
|
||||||
=> new TestAuthProvider(credentials);
|
=> new TestAuthProvider(credentials);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ namespace CryptoExchange.Net
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="options">Client options</param>
|
/// <param name="options">Client options</param>
|
||||||
/// <param name="apiOptions">Api client options</param>
|
/// <param name="apiOptions">Api client options</param>
|
||||||
public BaseApiClient(BaseClientOptions options, ApiClientOptions apiOptions)
|
protected BaseApiClient(BaseClientOptions options, ApiClientOptions apiOptions)
|
||||||
{
|
{
|
||||||
_apiCredentials = apiOptions.ApiCredentials ?? options.ApiCredentials;
|
_apiCredentials = apiOptions.ApiCredentials ?? options.ApiCredentials;
|
||||||
BaseAddress = apiOptions.BaseAddress;
|
BaseAddress = apiOptions.BaseAddress;
|
||||||
@ -60,7 +60,7 @@ namespace CryptoExchange.Net
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="credentials"></param>
|
/// <param name="credentials"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public abstract AuthenticationProvider CreateAuthenticationProvider(ApiCredentials credentials);
|
protected abstract AuthenticationProvider CreateAuthenticationProvider(ApiCredentials credentials);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Dispose
|
/// Dispose
|
||||||
|
@ -393,7 +393,7 @@ namespace CryptoExchange.Net
|
|||||||
/// <param name="message">The received data</param>
|
/// <param name="message">The received data</param>
|
||||||
/// <param name="request">The subscription request</param>
|
/// <param name="request">The subscription request</param>
|
||||||
/// <returns>True if the message is for the subscription which sent the request</returns>
|
/// <returns>True if the message is for the subscription which sent the request</returns>
|
||||||
protected internal abstract bool MessageMatchesHandler(JToken message, object request);
|
protected internal abstract bool MessageMatchesHandler(SocketConnection socketConnection, JToken message, object request);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Needs to check if a received message matches a handler by identifier. Generally used by GenericHandlers. For example; a generic handler is registered which handles ping messages
|
/// Needs to check if a received message matches a handler by identifier. Generally used by GenericHandlers. For example; a generic handler is registered which handles ping messages
|
||||||
/// from the server. This method should check if the message received is a ping message and the identifer is the identifier of the GenericHandler
|
/// from the server. This method should check if the message received is a ping message and the identifer is the identifier of the GenericHandler
|
||||||
@ -401,7 +401,7 @@ namespace CryptoExchange.Net
|
|||||||
/// <param name="message">The received data</param>
|
/// <param name="message">The received data</param>
|
||||||
/// <param name="identifier">The string identifier of the handler</param>
|
/// <param name="identifier">The string identifier of the handler</param>
|
||||||
/// <returns>True if the message is for the handler which has the identifier</returns>
|
/// <returns>True if the message is for the handler which has the identifier</returns>
|
||||||
protected internal abstract bool MessageMatchesHandler(JToken message, string identifier);
|
protected internal abstract bool MessageMatchesHandler(SocketConnection socketConnection, JToken message, string identifier);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Needs to authenticate the socket so authenticated queries/subscriptions can be made on this socket connection
|
/// Needs to authenticate the socket so authenticated queries/subscriptions can be made on this socket connection
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -258,7 +258,7 @@ namespace CryptoExchange.Net.Sockets
|
|||||||
currentSubscription = subscription;
|
currentSubscription = subscription;
|
||||||
if (subscription.Request == null)
|
if (subscription.Request == null)
|
||||||
{
|
{
|
||||||
if (socketClient.MessageMatchesHandler(messageEvent.JsonData, subscription.Identifier!))
|
if (socketClient.MessageMatchesHandler(this, messageEvent.JsonData, subscription.Identifier!))
|
||||||
{
|
{
|
||||||
handled = true;
|
handled = true;
|
||||||
subscription.MessageHandler(messageEvent);
|
subscription.MessageHandler(messageEvent);
|
||||||
@ -266,7 +266,7 @@ namespace CryptoExchange.Net.Sockets
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (socketClient.MessageMatchesHandler(messageEvent.JsonData, subscription.Request))
|
if (socketClient.MessageMatchesHandler(this, messageEvent.JsonData, subscription.Request))
|
||||||
{
|
{
|
||||||
handled = true;
|
handled = true;
|
||||||
messageEvent.JsonData = socketClient.ProcessTokenData(messageEvent.JsonData);
|
messageEvent.JsonData = socketClient.ProcessTokenData(messageEvent.JsonData);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user