1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-20 04:42:57 +00:00

Added Disposed property on BaseClient and IRestClient/ISocketClient interfaces

This commit is contained in:
Jkorf
2026-02-02 09:33:47 +01:00
parent 2c63a83117
commit ba55705385
3 changed files with 17 additions and 0 deletions
+7
View File
@@ -39,6 +39,11 @@ namespace CryptoExchange.Net.Clients
/// </summary>
public string Exchange { get; }
/// <summary>
/// Whether client is disposed
/// </summary>
public bool Disposed { get; private set; }
/// <summary>
/// Api clients in this client
/// </summary>
@@ -125,6 +130,8 @@ namespace CryptoExchange.Net.Clients
/// </summary>
public virtual void Dispose()
{
Disposed = true;
foreach (var client in ApiClients)
client.Dispose();
}