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:
parent
9bdef400da
commit
e7400ce334
@ -19,9 +19,9 @@ namespace CryptoExchange.Net
|
|||||||
public abstract class BaseClient : IDisposable
|
public abstract class BaseClient : IDisposable
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The name of the exchange the client is for
|
/// The name of the API the client is for
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal string ExchangeName { get; }
|
internal string Name { get; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Api clients in this client
|
/// Api clients in this client
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -56,19 +56,19 @@ namespace CryptoExchange.Net
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// ctor
|
/// ctor
|
||||||
/// </summary>
|
/// </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>
|
/// <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.UpdateWriters(options.LogWriters);
|
||||||
log.Level = options.LogLevel;
|
log.Level = options.LogLevel;
|
||||||
|
|
||||||
ClientOptions = options;
|
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>
|
/// <summary>
|
||||||
@ -278,7 +278,7 @@ namespace CryptoExchange.Net
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual void Dispose()
|
public virtual void Dispose()
|
||||||
{
|
{
|
||||||
log.Write(LogLevel.Debug, "Disposing exchange client");
|
log.Write(LogLevel.Debug, "Disposing client");
|
||||||
foreach (var client in ApiClients)
|
foreach (var client in ApiClients)
|
||||||
client.Dispose();
|
client.Dispose();
|
||||||
}
|
}
|
||||||
|
@ -74,15 +74,15 @@ namespace CryptoExchange.Net
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// ctor
|
/// ctor
|
||||||
/// </summary>
|
/// </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="exchangeOptions">The options for this client</param>
|
/// <param name="options">The options for this client</param>
|
||||||
protected BaseRestClient(string exchangeName, BaseRestClientOptions exchangeOptions) : base(exchangeName, exchangeOptions)
|
protected BaseRestClient(string name, BaseRestClientOptions options) : base(name, options)
|
||||||
{
|
{
|
||||||
if (exchangeOptions == null)
|
if (options == null)
|
||||||
throw new ArgumentNullException(nameof(exchangeOptions));
|
throw new ArgumentNullException(nameof(options));
|
||||||
|
|
||||||
ClientOptions = exchangeOptions;
|
ClientOptions = options;
|
||||||
RequestFactory.Configure(exchangeOptions.RequestTimeout, exchangeOptions.Proxy, exchangeOptions.HttpClient);
|
RequestFactory.Configure(options.RequestTimeout, options.Proxy, options.HttpClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
@ -101,14 +101,14 @@ namespace CryptoExchange.Net
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// ctor
|
/// ctor
|
||||||
/// </summary>
|
/// </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="exchangeOptions">The options for this client</param>
|
/// <param name="options">The options for this client</param>
|
||||||
protected BaseSocketClient(string exchangeName, BaseSocketClientOptions exchangeOptions): base(exchangeName, exchangeOptions)
|
protected BaseSocketClient(string name, BaseSocketClientOptions options) : base(name, options)
|
||||||
{
|
{
|
||||||
if (exchangeOptions == null)
|
if (options == null)
|
||||||
throw new ArgumentNullException(nameof(exchangeOptions));
|
throw new ArgumentNullException(nameof(options));
|
||||||
|
|
||||||
ClientOptions = exchangeOptions;
|
ClientOptions = options;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PackageId>CryptoExchange.Net</PackageId>
|
<PackageId>CryptoExchange.Net</PackageId>
|
||||||
<Authors>JKorf</Authors>
|
<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>
|
<PackageVersion>5.0.0-beta9</PackageVersion>
|
||||||
<AssemblyVersion>5.0.0</AssemblyVersion>
|
<AssemblyVersion>5.0.0</AssemblyVersion>
|
||||||
<FileVersion>5.0.0-beta9</FileVersion>
|
<FileVersion>5.0.0-beta9</FileVersion>
|
||||||
|
@ -163,7 +163,7 @@ namespace CryptoExchange.Net.Objects
|
|||||||
public TimeSpan SocketNoDataTimeout { get; set; }
|
public TimeSpan SocketNoDataTimeout { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <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
|
/// 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.
|
/// single connection will also increase the amount of traffic on that single connection, potentially leading to issues.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user