1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-06-08 08:26:20 +00:00

Small changes

This commit is contained in:
Jkorf 2021-12-03 16:23:05 +01:00
parent 6d0120d564
commit 0818c6277b
5 changed files with 9 additions and 9 deletions

View File

@ -122,7 +122,7 @@ namespace CryptoExchange.Net.UnitTests.TestImplementations
}
public override AuthenticationProvider CreateAuthenticationProvider(ApiCredentials credentials)
protected override AuthenticationProvider CreateAuthenticationProvider(ApiCredentials 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);
}

View File

@ -81,7 +81,7 @@ namespace CryptoExchange.Net.UnitTests.TestImplementations
}
public override AuthenticationProvider CreateAuthenticationProvider(ApiCredentials credentials)
protected override AuthenticationProvider CreateAuthenticationProvider(ApiCredentials credentials)
=> new TestAuthProvider(credentials);
}
}

View File

@ -49,7 +49,7 @@ namespace CryptoExchange.Net
/// </summary>
/// <param name="options">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;
BaseAddress = apiOptions.BaseAddress;
@ -60,7 +60,7 @@ namespace CryptoExchange.Net
/// </summary>
/// <param name="credentials"></param>
/// <returns></returns>
public abstract AuthenticationProvider CreateAuthenticationProvider(ApiCredentials credentials);
protected abstract AuthenticationProvider CreateAuthenticationProvider(ApiCredentials credentials);
/// <summary>
/// Dispose

View File

@ -393,7 +393,7 @@ namespace CryptoExchange.Net
/// <param name="message">The received data</param>
/// <param name="request">The subscription request</param>
/// <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>
/// 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
@ -401,7 +401,7 @@ namespace CryptoExchange.Net
/// <param name="message">The received data</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>
protected internal abstract bool MessageMatchesHandler(JToken message, string identifier);
protected internal abstract bool MessageMatchesHandler(SocketConnection socketConnection, JToken message, string identifier);
/// <summary>
/// Needs to authenticate the socket so authenticated queries/subscriptions can be made on this socket connection
/// </summary>

View File

@ -258,7 +258,7 @@ namespace CryptoExchange.Net.Sockets
currentSubscription = subscription;
if (subscription.Request == null)
{
if (socketClient.MessageMatchesHandler(messageEvent.JsonData, subscription.Identifier!))
if (socketClient.MessageMatchesHandler(this, messageEvent.JsonData, subscription.Identifier!))
{
handled = true;
subscription.MessageHandler(messageEvent);
@ -266,7 +266,7 @@ namespace CryptoExchange.Net.Sockets
}
else
{
if (socketClient.MessageMatchesHandler(messageEvent.JsonData, subscription.Request))
if (socketClient.MessageMatchesHandler(this, messageEvent.JsonData, subscription.Request))
{
handled = true;
messageEvent.JsonData = socketClient.ProcessTokenData(messageEvent.JsonData);