private void ClearToastClickedHandler(object sender, EventArgs e) { if (ToastClicked is null) { return; } foreach (var handler in ToastClicked.GetInvocationList()) { ToastClicked -= handler as Action; } }
private void SetToastClickedHandler(object sender, EventArgs e) { ToastClicked?.Invoke(); ClearToastClickedHandler(sender, e); }