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

Fixed various info-warnings and spelling issues

This commit is contained in:
JKorf
2025-02-09 21:25:26 +01:00
parent 024e8dcfe2
commit e07f24ea0a
47 changed files with 126 additions and 118 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ namespace CryptoExchange.Net.Clients
/// ctor
/// </summary>
/// <param name="logger">Logger</param>
/// <param name="outputOriginalData">Should data from this client include the orginal data in the call result</param>
/// <param name="outputOriginalData">Should data from this client include the original data in the call result</param>
/// <param name="baseAddress">Base address for this API client</param>
/// <param name="apiCredentials">Api credentials</param>
/// <param name="clientOptions">Client options</param>
+1 -1
View File
@@ -49,7 +49,7 @@ namespace CryptoExchange.Net.Clients
/// </summary>
protected internal ILogger _logger;
private object _versionLock = new object();
private readonly object _versionLock = new object();
private Version _exchangeVersion;
/// <summary>
@@ -93,6 +93,7 @@ namespace CryptoExchange.Net.Clients
{
tasks.Add(client.ReconnectAsync());
}
await Task.WhenAll(tasks.ToArray()).ConfigureAwait(false);
}
@@ -106,6 +107,7 @@ namespace CryptoExchange.Net.Clients
{
result.AppendLine(client.GetSubscriptionsState());
}
return result.ToString();
}
@@ -120,6 +122,7 @@ namespace CryptoExchange.Net.Clients
{
result.Add(client.GetState());
}
return result;
}
}
@@ -9,7 +9,7 @@ namespace CryptoExchange.Net.Clients
/// </summary>
public class CryptoBaseClient : IDisposable
{
private Dictionary<Type, object> _serviceCache = new Dictionary<Type, object>();
private readonly Dictionary<Type, object> _serviceCache = new Dictionary<Type, object>();
/// <summary>
/// Service provider
+2 -2
View File
@@ -89,7 +89,7 @@ namespace CryptoExchange.Net.Clients
/// <summary>
/// Memory cache
/// </summary>
private static MemoryCache _cache = new MemoryCache();
private readonly static MemoryCache _cache = new MemoryCache();
/// <summary>
/// ctor
@@ -826,7 +826,7 @@ namespace CryptoExchange.Net.Clients
if (parameterPosition == HttpMethodParameterPosition.InUri)
{
foreach (var parameter in parameters)
uri = uri.AddQueryParmeter(parameter.Key, parameter.Value.ToString()!);
uri = uri.AddQueryParameter(parameter.Key, parameter.Value.ToString()!);
}
var headers = new Dictionary<string, string>();
@@ -82,7 +82,7 @@ namespace CryptoExchange.Net.Clients
{
get
{
if (!socketConnections.Any())
if (socketConnections.IsEmpty)
return 0;
return socketConnections.Sum(s => s.Value.IncomingKbps);
@@ -97,7 +97,7 @@ namespace CryptoExchange.Net.Clients
{
get
{
if (!socketConnections.Any())
if (socketConnections.IsEmpty)
return 0;
return socketConnections.Sum(s => s.Value.UserSubscriptionCount);
@@ -510,7 +510,7 @@ namespace CryptoExchange.Net.Clients
if (connection != null)
{
if (connection.UserSubscriptionCount < ClientOptions.SocketSubscriptionsCombineTarget || socketConnections.Count >= (ApiOptions.MaxSocketConnections ?? ClientOptions.MaxSocketConnections) && socketConnections.All(s => s.Value.UserSubscriptionCount >= ClientOptions.SocketSubscriptionsCombineTarget))
if (connection.UserSubscriptionCount < ClientOptions.SocketSubscriptionsCombineTarget || (socketConnections.Count >= (ApiOptions.MaxSocketConnections ?? ClientOptions.MaxSocketConnections) && socketConnections.All(s => s.Value.UserSubscriptionCount >= ClientOptions.SocketSubscriptionsCombineTarget)))
// Use existing socket if it has less than target connections OR it has the least connections and we can't make new
return new CallResult<SocketConnection>(connection);
}
@@ -598,7 +598,7 @@ namespace CryptoExchange.Net.Clients
KeepAliveInterval = KeepAliveInterval,
ReconnectInterval = ClientOptions.ReconnectInterval,
RateLimiter = ClientOptions.RateLimiterEnabled ? RateLimiter : null,
RateLimitingBehaviour = ClientOptions.RateLimitingBehaviour,
RateLimitingBehavior = ClientOptions.RateLimitingBehaviour,
Proxy = ClientOptions.Proxy,
Timeout = ApiOptions.SocketNoDataTimeout ?? ClientOptions.SocketNoDataTimeout
};
@@ -718,7 +718,7 @@ namespace CryptoExchange.Net.Clients
base.SetOptions(options);
if ((!previousProxyIsSet && options.Proxy == null)
|| !socketConnections.Any())
|| socketConnections.IsEmpty)
{
return;
}