Пример #1
0
        protected override void DoWork()
        {
            var projects = AsyncHelper.RunSync(() => _projectRepository.GetAll().ToListAsync());

            foreach (var project in projects)
            {
                var utcNow         = Clock.Now.ToUniversalTime();
                var asanaBaseToken = new AsanaTaskInput()
                {
                    Token     = project.AsanaToken,
                    ProjectId = project.AsanaProjectId,
                };

                var asanaTasks = AsyncHelper.RunSync(() => _asanaManager.GetAllTasksInProject(asanaBaseToken));


                var getWorkItemsInput = new GetWorkItemsInput()
                {
                    Organization = project.DevOpsOrganization,
                    Project      = project.DevOpsProjectTitle,
                    Token        = project.DevOpsToken,
                    Version      = "6.0"
                };

                var result = AsyncHelper.RunSync(() => _devOpsManager.GetProjectWorkItems(getWorkItemsInput));
                AsyncHelper.RunSync(() => UpsertAsanaTasks(asanaTasks, project));
                AsyncHelper.RunSync(() => UpsertDevOpsTasks(result, project));
            }
        }
Пример #2
0
 public async Task <List <DevOpsValue> > GetProjectWorkItems(GetWorkItemsInput input)
 {
     return(await _devOpsManager.GetProjectWorkItems(input));
 }