Esempio n. 1
0
 public DeleteEntityCommand(ApiController controller, string id, DeleteProcessingModel model, ITaskProvider taskProvider, ITaskChecker taskChecker) : base(controller)
 {
     _id           = id;
     _model        = model;
     _taskProvider = taskProvider;
     _taskChecker  = taskChecker;
 }
 public static void CleanupFactory()
 {
     _backgroundScanner = null;
     _buildManager      = null;
     _taskProvider      = null;
     _projectStores.Clear();
 }
Esempio n. 3
0
 public QualityAccidentService(
     IAuthInfoProvider authInfoProvider,
     IAppRepositoryBase <QualityAccident> accidentRepository,
     IAppRepositoryBase <QualityAccidentDisposal> disposalRepository,
     //  IAppRepositoryBase<Project> projectRepository,
     IAppDbContextProvider dbContextProvider,
     IDbOperator op,
     IEventBus eventBus,
     IWfEngine wfEngine,
     IProjectHelper projectHelper
     )
 {
     _projectHelper      = projectHelper;
     _authInfoProvider   = authInfoProvider;
     _accidentRepository = accidentRepository;
     _disposalRepository = disposalRepository;
     // _projectRepository = projectRepository;
     _dbContextProvider = dbContextProvider;
     _eventBus          = eventBus;
     _op = op;
     _runtimeProvider   = wfEngine.GetRuntimeProvider();
     _taskProvider      = wfEngine.GetTaskProvider();
     _definitionProvder = wfEngine.GetDefinitionProvider();
     _historyProvider   = wfEngine.GetHistoryProvider();
 }
Esempio n. 4
0
 public TestRunnerService(
     IServiceClient <TestRunDto> testRunRepository,
     IServiceClient <TestRunLogDto> testRunLogRepository,
     IProcessProvider processStarter,
     IFileProvider fileProvider,
     IDirectoryProvider directoryProvider,
     IPathProvider pathProvider,
     IConsoleProvider consoleProvider,
     ITestsRunnerTestResultsService testResultsService,
     IJsonSerializer jsonSerializer,
     ITestCasesHistoryService testCasesHistoryService,
     ITaskProvider taskProvider,
     IPluginService pluginService,
     ITestRunLogService testRunLogService,
     IDateTimeProvider dateTimeProvider,
     IEnvironmentService environmentService)
 {
     _testRunRepository       = testRunRepository;
     _testRunLogRepository    = testRunLogRepository;
     _processStarter          = processStarter;
     _fileProvider            = fileProvider;
     _directoryProvider       = directoryProvider;
     _pathProvider            = pathProvider;
     _consoleProvider         = consoleProvider;
     _testResultsService      = testResultsService;
     _jsonSerializer          = jsonSerializer;
     _testCasesHistoryService = testCasesHistoryService;
     _taskProvider            = taskProvider;
     _pluginService           = pluginService;
     _testRunLogService       = testRunLogService;
     _dateTimeProvider        = dateTimeProvider;
     _environmentService      = environmentService;
 }
        public HomeController(IContestsProvider contestsProvider,
                              ITaskProvider archivedTaskProvider,
                              IPostProvider postProvider,
                              IUsersProvider usersProvider,
                              ICompetitorProvider competitorProvider)
        {
            if (contestsProvider == null)
            {
                throw new ArgumentNullException("contestsProvider");
            }
            if (archivedTaskProvider == null)
            {
                throw new ArgumentNullException("archivedTaskProvider");
            }
            if (postProvider == null)
            {
                throw new ArgumentNullException("postProvider");
            }
            if (usersProvider == null)
            {
                throw new ArgumentNullException("usersProvider");
            }
            if (competitorProvider == null)
            {
                throw new ArgumentNullException("competitorProvider");
            }

            _contestsProvider     = contestsProvider;
            _archivedTaskProvider = archivedTaskProvider;
            _postProvider         = postProvider;
            _usersProvider        = usersProvider;
            _competitorProvider   = competitorProvider;
        }
Esempio n. 6
0
 public ProjectService(
     IAppRepositoryBase <Project> projectRepository,
     IAppRepositoryBase <ProjectUnit> projectUnitRepository,
     IAuthInfoProvider authInfoProvider,
     IWfEngine wfEngine,
     IAuthorizationRepositoryBase <User> userRepository,
     IAuthorizationRepositoryBase <UserUnit> userUnitRepository,
     IAppDbContextProvider dbContextProvider,
     IMessagingProvider messagingProvider,
     IProjectHelper projectHelper
     )
 {
     _projectHelper         = projectHelper;
     _messagingProvider     = messagingProvider;
     _authInfoProvider      = authInfoProvider;
     _userRepository        = userRepository;
     _userUnitRepository    = userUnitRepository;
     _runtimeProvider       = wfEngine.GetRuntimeProvider();
     _taskProvider          = wfEngine.GetTaskProvider();
     _definitionProvder     = wfEngine.GetDefinitionProvider();
     _historyProvider       = wfEngine.GetHistoryProvider();
     _dbContextProvider     = dbContextProvider;
     _projectRepository     = projectRepository;
     _projectUnitRepository = projectUnitRepository;
 }
 public UpdateEntityCommand(ApiController controller, string id, UpdateProcessingModel model, ITaskProvider taskKeeper)
     : base(controller)
 {
     _id         = id;
     _model      = model;
     _taskKeeper = taskKeeper;
 }
Esempio n. 8
0
 public QualityProblemService(
     IAuthInfoProvider authInfoProvider,
     IAppRepositoryBase <QualityProblem> problemRepository,
     IAppRepositoryBase <QualityProblemRectification> rectificationRepository,
     // IAppRepositoryBase<Project> projectRepository,
     IAppDbContextProvider dbContextProvider,
     IDbOperator op,
     IEventBus eventBus,
     IWfEngine wfEngine,
     IProjectHelper projectHelper
     )
 {
     _projectHelper           = projectHelper;
     _authInfoProvider        = authInfoProvider;
     _problemRepository       = problemRepository;
     _rectificationRepository = rectificationRepository;
     //_projectRepository = projectRepository;
     _dbContextProvider = dbContextProvider;
     _eventBus          = eventBus;
     _op = op;
     _runtimeProvider   = wfEngine.GetRuntimeProvider();
     _taskProvider      = wfEngine.GetTaskProvider();
     _definitionProvder = wfEngine.GetDefinitionProvider();
     _historyProvider   = wfEngine.GetHistoryProvider();
 }
 public static ITaskProvider GetTaskProvider()
 {
     if (_taskProvider == null)
     {
         _taskProvider = new TaskProvider(_serviceProvider);
     }
     return(_taskProvider);
 }
Esempio n. 10
0
        public Worker(ITaskProvider taskProvider)
        {
            _taskProvider = taskProvider;

            _worker = new Thread(DoWork);
            _worker.IsBackground = true;
            _worker.Start();
        }
Esempio n. 11
0
 public TaskService(
     IWfEngine wfEgine,
     IAuthInfoProvider authInfoProvider)
 {
     _taskProvider     = wfEgine.GetTaskProvider();
     _historyProvider  = wfEgine.GetHistoryProvider();
     _authInfoProvider = authInfoProvider;
 }
 public static ITaskProvider GetTaskProvider()
 {
     if (_taskProvider == null)
     {
         _taskProvider = new TaskProvider(_serviceProvider);
     }
     return _taskProvider;
 }
Esempio n. 13
0
 private void CompleteTask_Click(object sender, RoutedEventArgs e)
 {
     Async(() =>
     {
         taskProvider.CompleteTask(task.Id);
         taskProvider = new TaskProviderClientFactory().CreateClient();
     });
     ViewMode_NoTask();
 }
Esempio n. 14
0
        //For bootstrap mapping
        //public TaskController(ITaskProvider taskProvider)
        //{
        //    _taskProvider = taskProvider;
        //}

        //For internal mapping
        public TaskController()
        {
            if (FlagCheckProvider.Instance.IsPreview(Constants.FeatureFlags.TaskProvider))
            {
                _taskProvider = (ITaskProvider)TinyIoCContainer.Current.Resolve <ITaskv2Provider>();
            }
            else
            {
                _taskProvider = (ITaskProvider)TinyIoCContainer.Current.Resolve <ITaskv1Provider>();
            }
        }
Esempio n. 15
0
        public Job(Distributed.Dispatcher dispatcher, ITaskProvider taskProvider, int priority)
        {
            using (Trace.Log())
            {
                this.Dispatcher               = dispatcher;
                this.Name                     = $"job_{Guid.NewGuid()}";
                this.Priority                 = priority;
                this.TaskCount                = taskProvider.TaskCount;
                this.taskProvider             = taskProvider;
                this.taskProvider.TasksAdded += NotifyTasksAvailable;

                stats.pending = taskProvider.TaskCount;
            }
        }
Esempio n. 16
0
 public ContractPaymentService(
     IAuthInfoProvider authInfoProvider,
     IAppRepositoryBase <ContractPayment> contractPaymentRepository,
     IAppDbContextProvider dbContextProvider,
     IWfEngine wfEngine
     )
 {
     _authInfoProvider          = authInfoProvider;
     _contractPaymentRepository = contractPaymentRepository;
     _dbContextProvider         = dbContextProvider;
     _runtimeProvider           = wfEngine.GetRuntimeProvider();
     _taskProvider      = wfEngine.GetTaskProvider();
     _definitionProvder = wfEngine.GetDefinitionProvider();
     _historyProvider   = wfEngine.GetHistoryProvider();
 }
Esempio n. 17
0
        public void AddJob(ITaskProvider taskProvider, int priority = 0)
        {
            using (Trace.Log())
            {
                lock (jobQueue)
                {
                    jobQueue.Add(priority, new Job(this, taskProvider, priority));
                }

                if (ActiveJob == null)
                {
                    StartNextJob();
                }
            }
        }
        public TaskController(
            IGraphSdkHelper graphSdkHelper,
            IRootConfigurationProvider rootConfigurationProvider,
            ITaskProvider taskProvider) : base(graphSdkHelper)
        {
            // Get from config
            var appOptions = rootConfigurationProvider.GeneralConfiguration;

            ProposalManagerApiUrl = appOptions.ProposalManagerApiUrl;
            SiteId = appOptions.SiteId;

            httpHelper = graphSdkHelper;

            this.taskProvider = taskProvider;
        }
Esempio n. 19
0
        public NFMT.Common.ResultModel Submit(UserModel user, IModel obj, ITaskProvider taskProvider, MasterEnum masterEnum)
        {
            ResultModel result = new ResultModel();

            //提交审核
            NFMT.WorkFlow.BLL.FlowMasterBLL flowMasterBLL = new NFMT.WorkFlow.BLL.FlowMasterBLL();
            result = flowMasterBLL.Get(user, (int)masterEnum);
            if (result.ResultStatus != 0)
                return result;
            NFMT.WorkFlow.Model.FlowMaster flowMaster = result.ReturnValue as NFMT.WorkFlow.Model.FlowMaster;

            NFMT.WorkFlow.Model.DataSource source = new NFMT.WorkFlow.Model.DataSource()
            {
                BaseName = obj.DataBaseName,
                TableCode = obj.TableName,
                DataStatus = NFMT.Common.StatusEnum.待审核,
                RowId = obj.Id,
                ViewUrl = flowMaster.ViewUrl,
                EmpId = user.EmpId,
                ApplyTime = DateTime.Now,
                ApplyTitle = string.Empty,
                ApplyMemo = string.Empty,
                ApplyInfo = string.Empty,
                ConditionUrl = flowMaster.ConditionUrl,
                RefusalUrl = flowMaster.RefusalUrl,
                SuccessUrl = flowMaster.SuccessUrl,
                DalName = obj.DalName,
                AssName = obj.AssName
            };

            result = taskProvider.Create(user,obj);
            if (result.ResultStatus != 0)
                return result;

            NFMT.WorkFlow.Model.Task task = result.ReturnValue as NFMT.WorkFlow.Model.Task;
            if (task == null)
            {
                result.ResultStatus = -1;
                result.Message = "创建任务失败";
                return result;
            }
            task.MasterId = flowMaster.MasterId;

            NFMT.WorkFlow.FlowOperate flowOperate = new NFMT.WorkFlow.FlowOperate();
            result = flowOperate.AuditAndCreateTask(user, obj, flowMaster, source, task);

            return result;
        }
        public TaskService(ITaskProvider taskProvider,
                           ISettingService settingService)
        {
            _taskProvider = taskProvider;

            _settingService = settingService;

            _selectors = new Dictionary <string, Func <Task, object> >
            {
                { "Name", FuncTaskNameKeySelector },
                { "Priority", FuncTaskPriorityKeySelector },
                { "TimeCreate", FuncTaskTimeCreateKeySelector },
                { "TimeToComplete", FuncTaskTimeToCompleteKeySelector },
                { "Status", FuncTaskStatusKeySelector }
            };
        }
Esempio n. 21
0
 public TestAgentRunProvider(
     IServiceClient <TestRunDto> testRunRepository,
     ITestRunOutputServiceClient testRunOutputServiceClient,
     IServiceClient <TestAgentDto> testAgentRepository,
     IServiceClient <TestAgentRunDto> testAgentRunRepository,
     IServiceClient <TestRunCustomArgumentDto> testRunCustomArgumentRepository,
     ITestsRunnerService nativeTestsRunner,
     ITestAgentsLoggerService testAgentsLoggerService,
     IDistributeLogger logger,
     ITestAgentStateSwitcher testAgentStateSwitcher,
     IPathProvider pathProvider,
     IFileProvider fileProvider,
     IConsoleProvider consoleProvider,
     IEnvironmentService environmentService,
     IGuidService guidService,
     IPluginService pluginService,
     IDateTimeProvider dateTimeProvider,
     ITaskProvider taskProvider,
     ITestRunLogService testRunLogService,
     ITestAgentRunAvailabilityServiceClient testAgentRunAvailabilityServiceClient,
     ITestRunAvailabilityServiceClient testRunAvailabilityServiceClient,
     IDirectoryProvider directoryProvider)
 {
     _testRunRepository               = testRunRepository;
     _testRunOutputServiceClient      = testRunOutputServiceClient;
     _testAgentRepository             = testAgentRepository;
     _testAgentRunRepository          = testAgentRunRepository;
     _testRunCustomArgumentRepository = testRunCustomArgumentRepository;
     _nativeTestsRunner               = nativeTestsRunner;
     _testAgentsLoggerService         = testAgentsLoggerService;
     _logger = logger;
     _testAgentStateSwitcher = testAgentStateSwitcher;
     _consoleProvider        = consoleProvider;
     _pathProvider           = pathProvider;
     _fileProvider           = fileProvider;
     _environmentService     = environmentService;
     _guidService            = guidService;
     _pluginService          = pluginService;
     _dateTimeProvider       = dateTimeProvider;
     _taskProvider           = taskProvider;
     _testRunLogService      = testRunLogService;
     _testAgentRunAvailabilityServiceClient = testAgentRunAvailabilityServiceClient;
     _testRunAvailabilityServiceClient      = testRunAvailabilityServiceClient;
     _directoryProvider        = directoryProvider;
     _wasTestAgentRunCompleted = false;
 }
Esempio n. 22
0
 private void InvokeTask(MethodInfo method, ITaskProvider taskProvider, object target)
 {
     try
     {
         if (method != null)
         {
             method.Invoke(taskProvider, new object[] { target, this.taskContext });
         }
     }
     catch
     {
     }
     finally
     {
         this.taskContext.DoTask();
     }
 }
Esempio n. 23
0
 public EarlyStageService(
     IAuthInfoProvider authInfoProvider,
     IAppRepositoryBase <EarlyStage> earlyStageRepository,
     IAppDbContextProvider dbContextProvider,
     IEventBus eventBus,
     IWfEngine wfEngine
     )
 {
     _authInfoProvider     = authInfoProvider;
     _earlyStageRepository = earlyStageRepository;
     _dbContextProvider    = dbContextProvider;
     _eventBus             = eventBus;
     _runtimeProvider      = wfEngine.GetRuntimeProvider();
     _taskProvider         = wfEngine.GetTaskProvider();
     _definitionProvder    = wfEngine.GetDefinitionProvider();
     _historyProvider      = wfEngine.GetHistoryProvider();
 }
Esempio n. 24
0
 public RecordService(
     IAppRepositoryBase <Record> recordRepository,
     IAuthInfoProvider authInfoProvider,
     IWfEngine wfEngine,
     IAuthorizationRepositoryBase <User> userRepository,
     IAppDbContextProvider dbContextProvider,
     IMessagingProvider messagingProvider)
 {
     _recordRepository  = recordRepository;
     _messagingProvider = messagingProvider;
     _authInfoProvider  = authInfoProvider;
     _userRepository    = userRepository;
     _runtimeProvider   = wfEngine.GetRuntimeProvider();
     _taskProvider      = wfEngine.GetTaskProvider();
     _definitionProvder = wfEngine.GetDefinitionProvider();
     _historyProvider   = wfEngine.GetHistoryProvider();
     _dbContextProvider = dbContextProvider;
 }
Esempio n. 25
0
        private static MethodInfo RandomMethod(ITaskProvider taskProvider)
        {
            var weight  = RandomUtility.Next(100) + 1;
            var methods = taskProvider.GetType().GetMethods();

            return(methods.RandomOrDefault((item) => Predicate(item)));

            bool Predicate(MethodInfo methodInfo)
            {
                if (methodInfo.IsStatic == true)
                {
                    return(false);
                }

                if (methodInfo.ReturnType != typeof(void))
                {
                    return(false);
                }

                var attr = methodInfo.GetCustomAttribute <TaskMethodAttribute>();

                if (attr == null)
                {
                    return(false);
                }

                if (attr.Weight < weight)
                {
                    return(false);
                }

                var parameters = methodInfo.GetParameters();

                if (parameters.Count() != 2)
                {
                    return(false);
                }

                return(parameters[1].ParameterType == typeof(TaskContext));
            }
        }
Esempio n. 26
0
 public ProjectTaskService(
     IAppRepositoryBase <ProjectTask> taskRepository,
     IAppRepositoryBase <ProjectGantt> ganttRepository,
     IAuthInfoProvider authInfoProvider,
     IWfEngine wfEngine,
     IAuthorizationRepositoryBase <User> userRepository,
     IAppDbContextProvider dbContextProvider,
     IProjectHelper projectHelper
     )
 {
     _ganttRepository       = ganttRepository;
     _projectHelper         = projectHelper;
     _authInfoProvider      = authInfoProvider;
     _userRepository        = userRepository;
     _runtimeProvider       = wfEngine.GetRuntimeProvider();
     _taskProvider          = wfEngine.GetTaskProvider();
     _definitionProvder     = wfEngine.GetDefinitionProvider();
     _historyProvider       = wfEngine.GetHistoryProvider();
     _dbContextProvider     = dbContextProvider;
     _projectTaskRepository = taskRepository;
 }
Esempio n. 27
0
        public MemorabiliaRecordService(
            IAuthInfoProvider authInfoProvider,
            IWfEngine wfEngine,
            IAppRepositoryBase <MemorabiliaRecord> recordRepository,
            //IAppRepositoryBase<Project> projectRepository,
            IAppDbContextProvider dbContextProvider,
            IProjectHelper projectHelper


            )
        {
            _projectHelper    = projectHelper;
            _authInfoProvider = authInfoProvider;
            _recordRepository = recordRepository;
            // _projectRepository = projectRepository;
            _dbContextProvider = dbContextProvider;
            _runtimeProvider   = wfEngine.GetRuntimeProvider();
            _taskProvider      = wfEngine.GetTaskProvider();
            _definitionProvder = wfEngine.GetDefinitionProvider();
            _historyProvider   = wfEngine.GetHistoryProvider();
        }
Esempio n. 28
0
        public JobManager(
            BatchCredentials batchCredentials,
            StorageCredentials storageCredentials,
            ITaskProvider taskProvider)
        {
            _batchClient = BatchClient.Open(
                new BatchSharedKeyCredentials(
                    batchCredentials.Url,
                    batchCredentials.Account,
                    batchCredentials.Key));

            _batchClient.CustomBehaviors.Add(
                RetryPolicyProvider.LinearRetryProvider(TimeSpan.FromSeconds(3), 10));

            _taskProvider = taskProvider;

            _storageAccount = new CloudStorageAccount(
                new Microsoft.WindowsAzure.Storage.Auth.StorageCredentials(
                    storageCredentials.Account,
                    storageCredentials.Key),
                true);
        }
 public TestAgentsLoggerService(IServiceClient <TestRunLogDto> testRunLogRepository, ITaskProvider taskProvider, IConsoleProvider consoleProvider)
 {
     _testRunLogRepository = testRunLogRepository;
     _taskProvider         = taskProvider;
     _consoleProvider      = consoleProvider;
 }
Esempio n. 30
0
 public VideoController(ITaskProvider taskProvider, ITaskChecker taskChecker)
 {
     _taskProvider = taskProvider;
     _taskChecker = taskChecker;
 }
 public FileSystemWatchingRunner(INotificationService notificationService, ITaskProvider taskProvider)
 {
     this.notificationService = notificationService;
     this.taskProvider = taskProvider;
     this.taskRunner = new TaskRunner();
 }
Esempio n. 32
0
 public TasksController(ITaskProvider taskKeeper)
 {
     _taskKeeper = taskKeeper;
 }
 public TaskConfiguration(ITaskProvider provider)
 {
     TaskProvider = provider;
 }
 public TasksController(ITaskProvider provider)
 {
     this.provider = provider;
 }
Esempio n. 35
0
 public ScreenshotController(ITaskProvider taskProvider, ITaskChecker taskChecker)
 {
     _taskProvider = taskProvider;
     _taskChecker  = taskChecker;
 }
Esempio n. 36
0
 private ExecutionResult ReportReject(ITaskProvider taskProvider, Task task)
 {
     taskProvider.RejectTask(task.Id);
     return ExecutionResult.Rejected(task.Id);
 }
Esempio n. 37
0
 public TaskPlanner(ITaskProvider taskProvider, ITaskExecutor taskExecutor, IUserNotifier userNotifier)
 {
     _taskProvider = taskProvider;
     _taskExecutor = taskExecutor;
     _userNotifier = userNotifier;
 }
Esempio n. 38
0
 public TaskConfiguration(ITaskProvider provider) {
     TaskProvider = provider;
 }
Esempio n. 39
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            Async(() =>
            {
                taskProvider = new TaskProviderClientFactory().CreateClient();

                Dispatcher.Invoke((Action)(() =>
                {
                    splash.Visibility = Visibility.Hidden;
                    ViewMode_NoTask();
                }));
            });
        }
Esempio n. 40
0
 public MainViewModel(ITaskProvider provider)
 {
     _provider = provider;
 }
Esempio n. 41
0
 public TaskController(ITaskProvider taskProvider)
 {
     if (taskProvider == null) throw new ArgumentNullException(nameof(taskProvider));
     _taskProvider = taskProvider;
 }
 public static void CleanupFactory()
 {
     _backgroundScanner = null;
     _buildManager = null;
     _taskProvider = null;
     _projectStores.Clear();
 }
Esempio n. 43
0
 private ExecutionResult ReportSuccess(ITaskProvider taskProvider, Task task)
 {
     taskProvider.CompleteTask(task.Id);
     return ExecutionResult.Success(task.Id);
 }
Esempio n. 44
0
 protected Task(ITaskProvider provider)
 {
     Provider = provider;
 }
 public TestPersonDataProvider()
 {
     _taskProvider = new TestTaskProvider();
     _workDayProvider = new TestPortalWorkDayProvider();
 }
Esempio n. 46
0
 public ScreenshotController(ITaskProvider taskProvider, ITaskChecker taskChecker)
 {
     _taskProvider = taskProvider;
     _taskChecker = taskChecker;
 }
Esempio n. 47
0
        private void ExecutionLoop(ITaskProvider taskProvider, IRepository repository)
        {
            while (true)
            {
                status.CurrentTask = null;
                status.Status = ExecutionStatus.WaitingForTask;
                engine.SystemResources = systemResources;
                engine.Repository = wrapperFactory.CreateWrapper(repository);
                Task task;
                try
                {
                    task = taskProvider.GetTask();
                    if(task == null)
                        continue;
                }
                catch (TimeoutException)
                {
                    (taskProvider as ITaskProviderChannel).Abort();
                    return;
                }

                var interval = taskProvider.QueryNotifyInterval();
                using (new Timer(
                    x => OnTimer((Tuple<ITaskProvider, Guid>) x),
                    Tuple.Create(taskProvider, task.Id),
                    TimeSpan.Zero,
                    interval))
                {
                    status.CurrentTask = task;
                    status.Status = ExecutionStatus.ProcessingTask;
                    try
                    {
                        using (Perfomance.Trace("GeneralCore::StartExecution()").BindToTrace())
                        {
                            engine.ExecuteTask(task);
                        }
                        ReportSuccess(taskProvider, task);
                    }
                    catch (TaskRejectedException)
                    {
                        ReportReject(taskProvider, task);
                    }
                    catch (TaskFailedException e)
                    {
                        ReportFailure(taskProvider, task, ErrorSource.Task, e.InnerException);
                    }
                    catch (Exception e)
                    {
                        ReportFailure(taskProvider, task, ErrorSource.Engine, e.InnerException);
                    }
                }
            }
        }
 public PersonDataProvider(ITaskProvider taskProvider, IWorkDayProvider workDayProvider)
 {
     _taskProvider = taskProvider;
     _workDayProvider = workDayProvider;
 }
Esempio n. 49
0
 private ExecutionResult ReportFailure(ITaskProvider taskProvider, Task task, ErrorSource source, Exception error)
 {
     taskProvider.FailTask(task.Id, new ErrorReport(task, error, source));
     return ExecutionResult.Failed(task.Id);
 }
 public ProjectDataProviders()
 {
     _workDayProvider = new PortalWorkTimeProvider();
     _taskProvider = new AtlassianJiraTaskProvider();
 }