private static void HandleAlertCleared(IInternalLocalUser localUser, IUserDatabase userDatabase, AbstractClearAlertNotificationEventArgs e) { IInternalAlert[] array = (from a in userDatabase.GetAlerts() where e.Notification.AlertIds.Contains(a.AlertId) select a).ToArray(); IInternalAlert[] array2 = array; foreach (IInternalAlert internalAlert in array2) { userDatabase.RemoveAlert(internalAlert.AlertId); } localUser.DispatchOnAlertsCleared(array); }