Ejemplo n.º 1
0
        private void GetTestCaseInfo(TestCaseRequest request)
        {
            long startTicks = Log.EVENT_HANDLER("Enter", Common.PROJECT_NAME);

            try
            {
                RequestHandlers.SpeedUpStart();

                char[] splitChars = { ',' };

                int testCaseId = 0;

                Options_AZDO_TFS options = GetOptions();

                foreach (string testCase in request.TestID.Split(splitChars, StringSplitOptions.None))
                {
                    if (int.TryParse(testCase, out testCaseId))
                    {
                        CreateWS_TM_TestCaseInfo(testCaseId, request.TestSections, options);
                    }

                    AZDOHelper.ProcessLoopDelay(options);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                RequestHandlers.SpeedUpEnd();
            }

            Log.EVENT_HANDLER("Exit", Common.PROJECT_NAME, startTicks);
        }
Ejemplo n.º 2
0
        private void GetTeamProjectInfo(TeamProjectActionRequest request)
        {
            long startTicks = Log.EVENT_HANDLER("Enter", Common.PROJECT_NAME);

            Options_AZDO_TFS options = GetOptions();

            var priorStatusBar = Globals.ThisAddIn.Application.StatusBar;

            try
            {
                Globals.ThisAddIn.Application.DisplayStatusBar = true;

                RequestHandlers.SpeedUpStart();

                if (options.TeamProjects is null)
                {
                    MessageBox.Show("No Team Project(s) selected, aborting");
                }
                else
                {
                    options.TeamProjects.Reverse();

                    foreach (string teamProjectName in options.TeamProjects)
                    {
                        try
                        {
                            Globals.ThisAddIn.Application.StatusBar = "Processing " + teamProjectName;

                            CreateWS_TP(teamProjectName, request, options);

                            Globals.ThisAddIn.Application.ActiveWorkbook.Save();

                            AZDOHelper.ProcessLoopDelay(options);
                        }
                        catch (Exception ex)
                        {
                            MessageBox.Show(ex.ToString());
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                Globals.ThisAddIn.Application.StatusBar = priorStatusBar;
                RequestHandlers.SpeedUpEnd();
            }

            Log.EVENT_HANDLER("Exit", Common.PROJECT_NAME, startTicks);
        }
Ejemplo n.º 3
0
        private void GetTeamProjectXML(TeamProjectActionRequest request)
        {
            long startTicks = Log.EVENT_HANDLER("Enter", Common.PROJECT_NAME);

            Options_AZDO_TFS options = GetOptions();

            var priorStatusBar = Globals.ThisAddIn.Application.StatusBar;

            try
            {
                Globals.ThisAddIn.Application.DisplayStatusBar = true;

                RequestHandlers.SpeedUpStart();

                foreach (string teamProjectName in options.TeamProjects)
                {
                    try
                    {
                        Globals.ThisAddIn.Application.StatusBar = "Processing " + teamProjectName;

                        Project project = AzureDevOpsExplorer.Presentation.Views.Server.WorkItemStore.Projects[teamProjectName];

                        Body_WorkItemStore.Get_TP_WorkItemTypesXML(options, project);

                        //Globals.ThisAddIn.Application.ActiveWorkbook.Save();

                        AZDOHelper.ProcessLoopDelay(options);
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.ToString());
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                Globals.ThisAddIn.Application.StatusBar = priorStatusBar;
                RequestHandlers.SpeedUpEnd();
            }

            Log.EVENT_HANDLER("Exit", Common.PROJECT_NAME, startTicks);
        }
Ejemplo n.º 4
0
        private void GetWorkItemInfo(WorkItemActionRequest request)
        {
            long startTicks = Log.EVENT_HANDLER("Enter", Common.PROJECT_NAME);

            try
            {
                RequestHandlers.SpeedUpStart();

                char[] splitChars = { ',' };

                int workItemId = 0;

                Options_AZDO_TFS options = GetOptions();

                foreach (string workItem in request.WorkItemID.Split(splitChars, StringSplitOptions.None))
                {
                    if (int.TryParse(workItem, out workItemId))
                    {
                        CreateWS_WIS_WorkItemInfo(workItemId, request, options);

                        Globals.ThisAddIn.Application.ActiveWorkbook.Save();
                    }

                    AZDOHelper.ProcessLoopDelay(options);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                RequestHandlers.SpeedUpEnd();
            }

            Log.EVENT_HANDLER("Exit", Common.PROJECT_NAME, startTicks);
        }