1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-16 19:03:01 +00:00

Get the state of ApiClient, SocketConnection, and Subscription as a record (#195)

This commit is contained in:
Jonnern
2024-04-16 14:37:00 +02:00
committed by GitHub
parent 24c40d2dc6
commit 2dbd5be924
4 changed files with 145 additions and 24 deletions
@@ -108,5 +108,19 @@ namespace CryptoExchange.Net.Clients
}
return result.ToString();
}
/// <summary>
/// Returns the state of all socket api clients
/// </summary>
/// <returns></returns>
public List<SocketApiClient.SocketApiClientState> GetSocketApiClientStates()
{
var result = new List<SocketApiClient.SocketApiClientState>();
foreach (var client in ApiClients.OfType<SocketApiClient>())
{
result.Add(client.GetState());
}
return result;
}
}
}