mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-06-07 16:06:15 +00:00
Removed some things for internal use from interfaces
This commit is contained in:
parent
f75cc75bbc
commit
6ba32fe280
@ -60,11 +60,6 @@ namespace CryptoExchange.Net.UnitTests
|
|||||||
headers = new Dictionary<string, string>();
|
headers = new Dictionary<string, string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string Sign(string toSign)
|
|
||||||
{
|
|
||||||
return toSign;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GetKey() => _credentials.Key.GetString();
|
public string GetKey() => _credentials.Key.GetString();
|
||||||
public string GetSecret() => _credentials.Secret.GetString();
|
public string GetSecret() => _credentials.Secret.GetString();
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ namespace CryptoExchange.Net
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="options"></param>
|
/// <param name="options"></param>
|
||||||
/// <exception cref="ArgumentNullException"></exception>
|
/// <exception cref="ArgumentNullException"></exception>
|
||||||
public virtual void Initialize(ExchangeOptions options)
|
protected virtual void Initialize(ExchangeOptions options)
|
||||||
{
|
{
|
||||||
if (options == null)
|
if (options == null)
|
||||||
throw new ArgumentNullException(nameof(options));
|
throw new ArgumentNullException(nameof(options));
|
||||||
|
@ -563,7 +563,7 @@ namespace CryptoExchange.Net
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="connection"></param>
|
/// <param name="connection"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public virtual Task<Uri?> GetReconnectUriAsync(SocketConnection connection)
|
protected internal virtual Task<Uri?> GetReconnectUriAsync(SocketConnection connection)
|
||||||
{
|
{
|
||||||
return Task.FromResult<Uri?>(connection.ConnectionUri);
|
return Task.FromResult<Uri?>(connection.ConnectionUri);
|
||||||
}
|
}
|
||||||
@ -573,7 +573,7 @@ namespace CryptoExchange.Net
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="request">The original request</param>
|
/// <param name="request">The original request</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public virtual Task<CallResult<object>> RevitalizeRequestAsync(object request)
|
protected internal virtual Task<CallResult<object>> RevitalizeRequestAsync(object request)
|
||||||
{
|
{
|
||||||
return Task.FromResult(new CallResult<object>(request));
|
return Task.FromResult(new CallResult<object>(request));
|
||||||
}
|
}
|
||||||
@ -683,7 +683,7 @@ namespace CryptoExchange.Net
|
|||||||
/// <param name="identifier">Identifier for the periodic send</param>
|
/// <param name="identifier">Identifier for the periodic send</param>
|
||||||
/// <param name="interval">How often</param>
|
/// <param name="interval">How often</param>
|
||||||
/// <param name="objGetter">Method returning the object to send</param>
|
/// <param name="objGetter">Method returning the object to send</param>
|
||||||
public virtual void SendPeriodic(string identifier, TimeSpan interval, Func<SocketConnection, object> objGetter)
|
protected virtual void SendPeriodic(string identifier, TimeSpan interval, Func<SocketConnection, object> objGetter)
|
||||||
{
|
{
|
||||||
if (objGetter == null)
|
if (objGetter == null)
|
||||||
throw new ArgumentNullException(nameof(objGetter));
|
throw new ArgumentNullException(nameof(objGetter));
|
||||||
|
@ -17,17 +17,5 @@ namespace CryptoExchange.Net.Interfaces
|
|||||||
/// Total amount of requests made with this API client
|
/// Total amount of requests made with this API client
|
||||||
/// </summary>
|
/// </summary>
|
||||||
int TotalRequestsMade { get; set; }
|
int TotalRequestsMade { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Get time offset for an API client. Return null if time syncing shouldnt/cant be done
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
TimeSpan? GetTimeOffset();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Get time sync info for an API client. Return null if time syncing shouldnt/cant be done
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
TimeSyncInfo? GetTimeSyncInfo();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -27,14 +27,6 @@ namespace CryptoExchange.Net.Interfaces
|
|||||||
/// The factory for creating sockets. Used for unit testing
|
/// The factory for creating sockets. Used for unit testing
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IWebsocketFactory SocketFactory { get; set; }
|
IWebsocketFactory SocketFactory { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Get the url to reconnect to after losing a connection
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="connection"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
Task<Uri?> GetReconnectUriAsync(SocketConnection connection);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Log the current state of connections and subscriptions
|
/// Log the current state of connections and subscriptions
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -45,19 +37,6 @@ namespace CryptoExchange.Net.Interfaces
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task ReconnectAsync();
|
Task ReconnectAsync();
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Update the original request to send when the connection is restored after disconnecting. Can be used to update an authentication token for example.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="request">The original request</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
Task<CallResult<object>> RevitalizeRequestAsync(object request);
|
|
||||||
/// <summary>
|
|
||||||
/// Periodically sends data over a socket connection
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="identifier">Identifier for the periodic send</param>
|
|
||||||
/// <param name="interval">How often</param>
|
|
||||||
/// <param name="objGetter">Method returning the object to send</param>
|
|
||||||
void SendPeriodic(string identifier, TimeSpan interval, Func<SocketConnection, object> objGetter);
|
|
||||||
/// <summary>
|
|
||||||
/// Unsubscribe all subscriptions
|
/// Unsubscribe all subscriptions
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user