سؤال

How do I remove all alarms from a ScheduledActionService?

ScheduledActionService.remove() method requires a name also does find()

هل كانت مفيدة؟

المحلول

List<ScheduledNotification> notifications = ScheduledActionService.GetActions<ScheduledNotification>().ToList();
foreach (ScheduledNotification notification in notifications)
{
    ScheduledActionService.Remove(notification.Name);
}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top