Skip to content

Commit

Permalink
Removed some things for internal use from interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
JKorf committed Oct 12, 2023
1 parent f75cc75 commit 6ba32fe
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ public override void AuthenticateRequest(RestApiClient apiClient, Uri uri, HttpM
headers = new Dictionary<string, string>();
}

public override string Sign(string toSign)
{
return toSign;
}

public string GetKey() => _credentials.Key.GetString();
public string GetSecret() => _credentials.Secret.GetString();
}
Expand Down
2 changes: 1 addition & 1 deletion CryptoExchange.Net/Clients/BaseClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected BaseClient(ILoggerFactory? logger, string name)
/// </summary>
/// <param name="options"></param>
/// <exception cref="ArgumentNullException"></exception>
public virtual void Initialize(ExchangeOptions options)
protected virtual void Initialize(ExchangeOptions options)
{
if (options == null)
throw new ArgumentNullException(nameof(options));
Expand Down
6 changes: 3 additions & 3 deletions CryptoExchange.Net/Clients/SocketApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ protected void AddGenericHandler(string identifier, Action<MessageEvent> action)
/// </summary>
/// <param name="connection"></param>
/// <returns></returns>
public virtual Task<Uri?> GetReconnectUriAsync(SocketConnection connection)
protected internal virtual Task<Uri?> GetReconnectUriAsync(SocketConnection connection)
{
return Task.FromResult<Uri?>(connection.ConnectionUri);
}
Expand All @@ -573,7 +573,7 @@ protected void AddGenericHandler(string identifier, Action<MessageEvent> action)
/// </summary>
/// <param name="request">The original request</param>
/// <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));
}
Expand Down Expand Up @@ -683,7 +683,7 @@ protected virtual IWebsocket CreateSocket(string address)
/// <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>
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)
throw new ArgumentNullException(nameof(objGetter));
Expand Down
12 changes: 0 additions & 12 deletions CryptoExchange.Net/Interfaces/IRestApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,5 @@ public interface IRestApiClient : IBaseApiClient
/// Total amount of requests made with this API client
/// </summary>
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();
}
}
21 changes: 0 additions & 21 deletions CryptoExchange.Net/Interfaces/ISocketApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ public interface ISocketApiClient: IBaseApiClient
/// The factory for creating sockets. Used for unit testing
/// </summary>
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>
/// Log the current state of connections and subscriptions
/// </summary>
Expand All @@ -45,19 +37,6 @@ public interface ISocketApiClient: IBaseApiClient
/// <returns></returns>
Task ReconnectAsync();
/// <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
/// </summary>
/// <returns></returns>
Expand Down

0 comments on commit 6ba32fe

Please sign in to comment.