public WebSocketManagerException(IKucoinWebSocketClient client, string message, Exception innerException) : base(message, innerException) { Throw.IfNull(client, nameof(client)); Client = client; }
/// <summary> /// Raise an error event on controller exception. /// </summary> /// <param name="client">The client associated with the exception.</param> /// <param name="exception">The inner exception.</param> /// <param name="message">The exception message (optional).</param> private void RaiseErrorEvent(IKucoinWebSocketClient client, Exception exception, string message = null) { var args = new WebSocketManagerErrorEventArgs( new WebSocketManagerException(client, message, exception)); try { Error?.Invoke(this, args); } catch (OperationCanceledException) { } catch (Exception e) { _logger?.LogError(e, $"{nameof(KucoinWebSocketManager)}: Unhandled error event handler exception."); } }
public WebSocketManagerException(IKucoinWebSocketClient client, Exception innerException) : this(client, null, innerException) { }
public WebSocketManagerException(IKucoinWebSocketClient client, string message) : this(client, message, null) { }
public WebSocketManagerException(IKucoinWebSocketClient client) : this(client, null, null) { }
/// <summary> /// Get the <see cref="IRetryTaskController"/> associated with the /// <see cref="IKucoinWebSocketClient"/> web socket stream. /// </summary> /// <param name="manager"></param> /// <param name="client"></param> /// <returns></returns> public static IRetryTaskController GetController(this IKucoinWebSocketManager manager, IKucoinWebSocketClient client) { Throw.IfNull(manager, nameof(manager)); Throw.IfNull(client, nameof(client)); return(manager.GetController(client.WebSocket)); }