1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-06-07 16:06:15 +00:00

Made some names more generic

This commit is contained in:
Jkorf 2022-02-17 16:10:49 +01:00
parent 9bdef400da
commit e7400ce334
5 changed files with 23 additions and 23 deletions

View File

@ -19,9 +19,9 @@ namespace CryptoExchange.Net
public abstract class BaseClient : IDisposable
{
/// <summary>
/// The name of the exchange the client is for
/// The name of the API the client is for
/// </summary>
internal string ExchangeName { get; }
internal string Name { get; }
/// <summary>
/// Api clients in this client
/// </summary>
@ -56,19 +56,19 @@ namespace CryptoExchange.Net
/// <summary>
/// ctor
/// </summary>
/// <param name="exchangeName">The name of the exchange this client is for</param>
/// <param name="name">The name of the API this client is for</param>
/// <param name="options">The options for this client</param>
protected BaseClient(string exchangeName, BaseClientOptions options)
protected BaseClient(string name, BaseClientOptions options)
{
log = new Log(exchangeName);
log = new Log(name);
log.UpdateWriters(options.LogWriters);
log.Level = options.LogLevel;
ClientOptions = options;
ExchangeName = exchangeName;
Name = name;
log.Write(LogLevel.Trace, $"Client configuration: {options}, CryptoExchange.Net: v{typeof(BaseClient).Assembly.GetName().Version}, {ExchangeName}.Net: v{GetType().Assembly.GetName().Version}");
log.Write(LogLevel.Trace, $"Client configuration: {options}, CryptoExchange.Net: v{typeof(BaseClient).Assembly.GetName().Version}, {name}.Net: v{GetType().Assembly.GetName().Version}");
}
/// <summary>
@ -278,7 +278,7 @@ namespace CryptoExchange.Net
/// </summary>
public virtual void Dispose()
{
log.Write(LogLevel.Debug, "Disposing exchange client");
log.Write(LogLevel.Debug, "Disposing client");
foreach (var client in ApiClients)
client.Dispose();
}

View File

@ -74,15 +74,15 @@ namespace CryptoExchange.Net
/// <summary>
/// ctor
/// </summary>
/// <param name="exchangeName">The name of the exchange this client is for</param>
/// <param name="exchangeOptions">The options for this client</param>
protected BaseRestClient(string exchangeName, BaseRestClientOptions exchangeOptions) : base(exchangeName, exchangeOptions)
/// <param name="name">The name of the API this client is for</param>
/// <param name="options">The options for this client</param>
protected BaseRestClient(string name, BaseRestClientOptions options) : base(name, options)
{
if (exchangeOptions == null)
throw new ArgumentNullException(nameof(exchangeOptions));
if (options == null)
throw new ArgumentNullException(nameof(options));
ClientOptions = exchangeOptions;
RequestFactory.Configure(exchangeOptions.RequestTimeout, exchangeOptions.Proxy, exchangeOptions.HttpClient);
ClientOptions = options;
RequestFactory.Configure(options.RequestTimeout, options.Proxy, options.HttpClient);
}
/// <inheritdoc />

View File

@ -101,14 +101,14 @@ namespace CryptoExchange.Net
/// <summary>
/// ctor
/// </summary>
/// <param name="exchangeName">The name of the exchange this client is for</param>
/// <param name="exchangeOptions">The options for this client</param>
protected BaseSocketClient(string exchangeName, BaseSocketClientOptions exchangeOptions): base(exchangeName, exchangeOptions)
/// <param name="name">The name of the API this client is for</param>
/// <param name="options">The options for this client</param>
protected BaseSocketClient(string name, BaseSocketClientOptions options) : base(name, options)
{
if (exchangeOptions == null)
throw new ArgumentNullException(nameof(exchangeOptions));
if (options == null)
throw new ArgumentNullException(nameof(options));
ClientOptions = exchangeOptions;
ClientOptions = options;
}
/// <summary>

View File

@ -5,7 +5,7 @@
<PropertyGroup>
<PackageId>CryptoExchange.Net</PackageId>
<Authors>JKorf</Authors>
<Description>A base package for implementing cryptocurrency exchange API's</Description>
<Description>A base package for implementing cryptocurrency API's</Description>
<PackageVersion>5.0.0-beta9</PackageVersion>
<AssemblyVersion>5.0.0</AssemblyVersion>
<FileVersion>5.0.0-beta9</FileVersion>

View File

@ -163,7 +163,7 @@ namespace CryptoExchange.Net.Objects
public TimeSpan SocketNoDataTimeout { get; set; }
/// <summary>
/// The amount of subscriptions that should be made on a single socket connection. Not all exchanges support multiple subscriptions on a single socket.
/// The amount of subscriptions that should be made on a single socket connection. Not all API's support multiple subscriptions on a single socket.
/// Setting this to a higher number increases subscription speed because not every subscription needs to connect to the server, but having more subscriptions on a
/// single connection will also increase the amount of traffic on that single connection, potentially leading to issues.
/// </summary>