1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-15 02:13:01 +00:00

Added Unsubsribe overload with id parameter

This commit is contained in:
Jan Korf
2021-09-05 10:25:12 +02:00
parent 4fe2d8f3a6
commit 8054facdf4
5 changed files with 81 additions and 18 deletions
@@ -205,6 +205,16 @@ namespace CryptoExchange.Net.Sockets
subscriptions.Add(subscription);
}
/// <summary>
/// Get a subscription on this connection
/// </summary>
/// <param name="id"></param>
public SocketSubscription GetSubscription(int id)
{
lock (subscriptionLock)
return subscriptions.SingleOrDefault(s => s.Id == id);
}
private bool HandleData(MessageEvent messageEvent)
{
SocketSubscription? currentSubscription = null;