/// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="workItemService"></param>
 /// <param name="actionString">Строка действия для обычного пользователя</param>
 /// <param name="currentUserActionString">Строка действия для текущего пользователя</param>
 protected SimpleEventDescriber(WorkItemService workItemService)
 {
     this._workItemService = workItemService;
 }
Esempio n. 2
0
 public ClearCommand(WorkItemService workItemService)
 {
     _workItemService = workItemService;
     ConfigureCommand();
 }
 public CodePlexWorkItemModifier(WorkItemService workItemService)
 {
     this.workItemService     = workItemService;
     this.workItemService.Url = Configuration.CodePlexWorkItemUrl;
 }
 public ItemDisappointedEventDescriber(WorkItemService workItemService, UsersService userService)
 {
     this._workItemService = workItemService;
     this._userService     = userService;
 }
 public PreciseWorkItemController(PreciseWorkItemService service, WorkItemService workItemService)
 {
     _service         = service;
     _workItemService = workItemService;
 }
Esempio n. 6
0
 public RenameCommand(WorkItemService workItemService)
 {
     _workItemService = workItemService;
     ConfigureCommand();
 }
Esempio n. 7
0
 public ArchiveCommand(WorkItemService workItemService)
 {
     _workItemService = workItemService;
     ConfigureCommand();
 }
Esempio n. 8
0
 public WorkItemCurrentMonthController(WorkItemService service)
 {
     _service = service;
 }
        public static void Main(string[] args)
        {
            #region Configuration

            var builder = new ConfigurationBuilder()
                          .SetBasePath(Directory.GetCurrentDirectory())
                          .AddJsonFile("appsettings.json");

            IConfiguration config = new ConfigurationBuilder()
                                    .AddJsonFile("appsettings.json", true, true)
                                    .Build();

            #endregion

            #region Proprieties

            List <Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItem> workItensExternal = new List <Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItem>();
            IEnumerable <Domain.Entities.WorkItem> workItens = new List <Domain.Entities.WorkItem>();
            Project project = new Project();

            #endregion

            // Get Project in DataBase
            using (IUnitOfWork uow = new UnitOfWork(config))
            {
                Task.Run(async() =>
                {
                    project = await uow.projectRepository.Get();
                }).Wait();
            }

            if (project != null)
            {
                // Get WorkItem Azure
                Task.Run(async() =>
                {
                    Console.WriteLine("Acessando Azure DevOps");
                    WorkItemServiceExternal workItemServiceExternal = new WorkItemServiceExternal();
                    workItensExternal = await workItemServiceExternal.RunGetTasksQuery(project);
                    Console.WriteLine("WorkItens Recuperado com sucesso");
                }).Wait();


                Console.WriteLine("Convertendo objeto externo para entity Work Item");
                WorkItemService workItemService = new WorkItemService();
                workItens = workItemService.ConvertToWorkItem(workItensExternal);

                // Save Work Item in Data Base
                Console.WriteLine("Salvando os Work Itens no banco de dados");

                using (IUnitOfWork uow = new UnitOfWork(config))
                {
                    Task.Run(async() =>
                    {
                        await uow.workItemRepository.Delete();
                        await uow.workItemRepository.Creates(workItens);
                    }).Wait();
                }

                Console.WriteLine("Dados salvos com sucesso !");
            }
            else
            {
                Console.WriteLine("Não foi possível carregar configuração do projeto azure dev ops");
            }

            Console.ReadKey();
        }
Esempio n. 10
0
 public IssuesListView(WorkItemService workItemService) : this()
 {
     _workItemService = workItemService;
 }
Esempio n. 11
0
        static void Main(string[] args)
        {
            var workItemService = new WorkItemService();

            while (true)
            {
                Console.WriteLine("--------------------------");
                PrintUsage();

                string command = Console.ReadLine();

                if (command.ToLower().Trim() == "quit")
                {
                    return;
                }

                // Parse the arguments
                string cmd, title = null, desc = null;
                int    id;
                try
                {
                    var arguments = command.Split(" ").Where(x => x != "").ToArray();
                    cmd = arguments[0].ToLower();
                    id  = int.Parse(arguments[1]);
                    if (arguments.Count() > 2)
                    {
                        title = arguments[2];
                        desc  = arguments[3];
                    }
                }
                catch (Exception)
                {
                    Console.WriteLine("Error");
                    continue;
                }

                var wi = workItemService.GetById(id);
                // Execute Command
                try
                {
                    switch (cmd.ToLower())
                    {
                    case "create":
                        wi = new WorkItem();
                        workItemService.Create(wi);
                        wi.Edit(title, desc);
                        wi.Print();
                        break;

                    case "delete":
                        if (wi.CanDelete())
                        {
                            workItemService.Delete(wi);
                        }
                        break;

                    case "edit":
                        wi.Edit(title, desc);
                        workItemService.Edit(wi);
                        break;

                    case "open":
                        wi.Open();
                        workItemService.Edit(wi);
                        break;

                    case "resolve":
                        wi.Resolve();
                        workItemService.Edit(wi);
                        break;

                    case "verify":
                        wi.Verify();
                        workItemService.Edit(wi);
                        break;

                    case "print":
                        wi.Print();
                        break;

                    default:
                        PrintUsage();
                        continue;
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Unable to perform operation. " + ex.Message);
                    PrintUsage();
                }
            }
        }
 public StateChangedEventDescriber(WorkItemService workItemService, UsersService userService)
 {
     _workItemService = workItemService;
     _userService     = userService;
 }
Esempio n. 13
0
 public StopCommand(WorkItemService workItemService)
 {
     ConfigureCommand();
     _workItemService = workItemService;
 }
Esempio n. 14
0
 public WorkItemController(WorkItemService workItemService)
 {
     _workItemService = workItemService;
 }
Esempio n. 15
0
 public CurrentCommand(WorkItemService workItemService)
 {
     _workItemService = workItemService;
     ConfigureCommand();
 }
 public ItemAddedEventDescriber(WorkItemService workItemService) : base(workItemService)
 {
 }
Esempio n. 17
0
 public DumpSpecialWorkItemController(WorkItemService service)
 {
     _service = service;
 }
Esempio n. 18
0
 public WorkItemController(WorkItemService service)
 {
     _service = service;
 }
Esempio n. 19
0
 public ItemChangedEventDecriber(WorkItemService workItemService) : base(workItemService)
 {
 }
 public IssuesListView(WorkItemService workItemService)
     : this()
 {
     _workItemService = workItemService;
 }
Esempio n. 21
0
 public KpiController(TownQueryService townService, KpiImportService importService, WorkItemService workItemService)
 {
     _townService     = townService;
     _importService   = importService;
     _workItemService = workItemService;
 }