public void doTask(taskenddelegate task, Message m) { NotificationArgs notificationInfo = new NotificationArgs(isTaskCompleted); if (notificationChanged != null) { Console.WriteLine("start"); notificationChanged(this, notificationInfo); } isTaskCompleted = true; if (isTaskCompleted) { var status = task(m); if (notificationChanged != null) { notificationChanged(this, notificationInfo); Console.WriteLine("ty"); } } }
public static void showNotification(object clock, NotificationArgs e) { Console.WriteLine(e.status); }