internal static void OnTaskFinished(SnTaskResult taskResult) { Debug.WriteLine("#TaskManager> TaskManagerBase.OnTaskFinished fired."); if (_instance.TaskFinished != null) { _instance.TaskFinished(_instance, new TaskFinishedEventArgs { TaskResult = taskResult }); } }
public void TaskFinished(SnTaskResult taskResult) { Debug.WriteLine("#TaskManagerHub> TaskFinished received. Agent: {0}, taskId: {1}, code: {2}, error: {3}", taskResult.AgentName, taskResult.Task.Id, taskResult.ResultCode, taskResult.Error == null ? "" : taskResult.Error.Message); // remove the task from the database first TaskDataHandler.DeleteTask(taskResult.Task.Id); Debug.WriteLine("#TaskManagerHub>FinishTask: task#{0} has been deleted.", taskResult.Task.Id); // then call the finalizer TaskManagerBase.OnTaskFinished(taskResult); }
public void Finalize(SnTaskResult result) { Debug.WriteLine("#TaskManager> DefaultTaskFinalizer.Finalize called."); }