private void Cancel(AuthenticationCancelledReason reason) { _active = false; _webSocket.Close(); AuthenticationCancelled?.Invoke(this, new CancellationEventArgs(reason)); }
/// <summary> /// Constructs a new <see cref="CancellationEventArgs"/>. /// </summary> /// <param name="reason">The reason for the cancellation.</param> public CancellationEventArgs(AuthenticationCancelledReason reason) { Reason = reason; }