private void OnClientDisconnected(ConnectableBase sender, DisconnectedEventArgs e) { e.Client.Disconnected -= OnClientDisconnected; OnDisconnected(this, e); }
/// <summary> /// Initializes a new instance of the <see cref="ClientDisconnectedException"/> class with the specified <see cref="DisconnectedEventArgs"/>. /// </summary> /// <param name="e"></param> public ClientDisconnectedException(DisconnectedEventArgs e) { Args = e; }
/// <summary> /// Raises the <see cref="Disconnected"/> event /// </summary> /// <param name="sender">The <see cref="ConnectableBase"/> raising this event.</param> /// <param name="e">An <see cref="EventArgs"/> that contains the event data.</param> protected virtual void OnDisconnected(ConnectableBase sender, DisconnectedEventArgs e) { Disconnected?.Invoke(sender, e); }