/// <summary>
 ///     Initializes a new instance of the <see cref="NodeDisconnectedEventArgs"/> class.
 /// </summary>
 /// <param name="node">the node that disconnected</param>
 /// <param name="uri">the URI connect / reconnected / disconnected from / to</param>
 /// <param name="closeStatus">the close status</param>
 /// <param name="reason">the close reason</param>
 /// <param name="byRemote">
 ///     a value indicating whether the connection was closed by the remote endpoint.
 /// </param>
 /// <exception cref="ArgumentNullException">
 ///     thrown if the specified <paramref name="uri"/> is <see langword="null"/>.
 /// </exception>
 /// <exception cref="ArgumentNullException">
 ///     thrown if the specified <paramref name="node"/> is <see langword="null"/>.
 /// </exception>
 public NodeDisconnectedEventArgs(LavalinkClusterNode node, Uri uri, WebSocketCloseStatus closeStatus, string reason, bool byRemote)
     : base(uri, closeStatus, reason, byRemote) => Node = node ?? throw new ArgumentNullException(nameof(node));
示例#2
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="NodeConnectedEventArgs"/> class.
 /// </summary>
 /// <param name="node">the node that connected</param>
 /// <param name="uri">the URI connect / reconnected / disconnected from / to</param>
 /// <param name="wasReconnect">a value indicating whether the connect was a reconnect</param>
 /// <exception cref="ArgumentNullException">
 ///     thrown if the specified <paramref name="uri"/> is <see langword="null"/>.
 /// </exception>
 /// <exception cref="ArgumentNullException">
 ///     thrown if the specified <paramref name="node"/> is <see langword="null"/>.
 /// </exception>
 public NodeConnectedEventArgs(LavalinkClusterNode node, Uri uri, bool wasReconnect)
     : base(uri, wasReconnect) => Node = node ?? throw new ArgumentNullException(nameof(node));