Beispiel #1
0
        private void ExecuteTask(IReportTask task)
        {
            task.UpdateLastTime();

            SendServiceInfo($"Executing task {task.Id} (scheduled)");

            var context = task.GetCurrentContext(false);

            if (context == null)
            {
                return;
            }

            var instanceId = context.TaskInstance.Id;

            contextsInWork.Add(instanceId, context);

            Task.Factory.StartNew(() => task.Execute(context), context.CancelSource.Token)
            .ContinueWith(_ => EndContextWork(instanceId));
        }
Beispiel #2
0
 public ExportHistoryToExcelCommand(IWorkspace workspace, IReportTask reportTask, IDialogCreator dialogCreator)
 {
     _workspace     = workspace;
     _reportTask    = reportTask;
     _dialogCreator = dialogCreator;
 }
 public ExportHistoryUICommand(IMoBiContext context, IReportTask reportTask, IDialogCreator dialogCreator)
 {
     _context       = context;
     _reportTask    = reportTask;
     _dialogCreator = dialogCreator;
 }