Ejemplo n.º 1
0
        public async Task <string> ExportProcessConfig(ITFManager tfManager, string projectCollectionName, string teamProjectName)
        {
            string argument = string.Format("exportprocessconfig /collection:{0}/{1} /p:{2}", tfManager.TfsAddress, projectCollectionName, teamProjectName);
            string result   = await InvokeCommand(argument);

            return(result);
        }
Ejemplo n.º 2
0
        public async Task<string> ExportCategories(ITFManager tfManager, string projectCollectionName, string teamProjectName)
        {
            string argument = string.Format("exportcategories /collection:{0}/{1} /p:{2}", tfManager.TfsAddress, projectCollectionName, teamProjectName);
            string result = await InvokeCommand(argument);

            return result;
        }
Ejemplo n.º 3
0
        public async Task <string> DestroyWorkItem(ITFManager tfManager, string projectCollectionName, string teamProjectName, string workItemTypeName)
        {
            string argument = string.Format("destroywitd /collection:{0}/{1} /p:{2} /n:\"{3}\" /noprompt", tfManager.TfsAddress, projectCollectionName, teamProjectName, workItemTypeName);

            string result = await InvokeCommand(argument);

            return(result);
        }
Ejemplo n.º 4
0
        public async Task <string> ExportWorkItemDefenition(ITFManager tfManager, string projectCollectionName, string teamProjectName, string workItemTypeName)
        {
            string argument = string.Format("exportwitd /collection:{0}/{1} /p:{2} /n:\"{3}\"", tfManager.TfsAddress, projectCollectionName, teamProjectName, workItemTypeName);

            string workItemDefenition = await InvokeCommand(argument);

            return(workItemDefenition);
        }
Ejemplo n.º 5
0
        public async Task <string[]> ExportWorkItemTypes(ITFManager tfManager, string projectCollectionName, string teamProjectName)
        {
            string argument = string.Format(@"listwitd /collection:{0}/{1} /p:{2}", tfManager.TfsAddress, projectCollectionName, teamProjectName);

            string[] workItemTypes = await InvokeCommandWithSplitedResult(argument);

            return(workItemTypes);
        }
Ejemplo n.º 6
0
        public async Task<string> DestroyWorkItem(ITFManager tfManager, string projectCollectionName, string teamProjectName, string workItemTypeName)
        {
            string argument = string.Format("destroywitd /collection:{0}/{1} /p:{2} /n:\"{3}\" /noprompt", tfManager.TfsAddress, projectCollectionName, teamProjectName, workItemTypeName);

            string result = await InvokeCommand(argument);

            return result;
        }
Ejemplo n.º 7
0
        public async Task<string> ExportWorkItemDefenition(ITFManager tfManager, string projectCollectionName, string teamProjectName, string workItemTypeName)
        {
            string argument = string.Format("exportwitd /collection:{0}/{1} /p:{2} /n:\"{3}\"", tfManager.TfsAddress, projectCollectionName, teamProjectName, workItemTypeName);

            string workItemDefenition = await InvokeCommand(argument);

            return workItemDefenition;
        }
Ejemplo n.º 8
0
        public async Task<string[]> ExportWorkItemTypes(ITFManager tfManager, string projectCollectionName, string teamProjectName)
        {
            string argument = string.Format(@"listwitd /collection:{0}/{1} /p:{2}", tfManager.TfsAddress, projectCollectionName, teamProjectName);

            string[] workItemTypes = await InvokeCommandWithSplitedResult(argument);

            return workItemTypes;
        }
Ejemplo n.º 9
0
        private async Task <List <ProjectCollectionInfo> > GetProjectCollectionInfos(ITFManager tfManager)
        {
            var projectCollectionInfos = new List <ProjectCollectionInfo>();

            Progress.BeginWorking();
            try
            {
                await Task.Run(() =>
                {
                    var projectCollections = tfManager.ProjectCollections;
                    var teamProjects       = tfManager.TeamProjects;

                    foreach (var projectCollection in projectCollections)
                    {
                        var teamProjectInfos = teamProjects[projectCollection.Key]
                                               .Select(teamProjectItem =>
                                                       new TeamProjectInfo()
                        {
                            Name = teamProjectItem.Name, WorkItemTypeInfos = null, Categories = null, ProcessConfig = null
                        }
                                                       ).ToArray();
                        var projColInfo = new ProjectCollectionInfo()
                        {
                            Name = projectCollection.Key, TeamProjectInfos = teamProjectInfos
                        };
                        projectCollectionInfos.Add(projColInfo);
                    }
                });

                Progress.NextStep();
            }
            finally
            {
                Progress.EndWorking();
            }

            return(projectCollectionInfos.ToList());
        }
Ejemplo n.º 10
0
        private async Task<List<ProjectCollectionInfo>> GetProjectCollectionInfos(ITFManager tfManager)
        {
            var projectCollectionInfos = new List<ProjectCollectionInfo>();
            Progress.BeginWorking();
            try
            {
                await Task.Run(() =>
                {
                    var projectCollections = tfManager.ProjectCollections;
                    var teamProjects = tfManager.TeamProjects;

                    foreach (var projectCollection in projectCollections)
                    {
                        var teamProjectInfos = teamProjects[projectCollection.Key]
                            .Select(teamProjectItem =>
                                new TeamProjectInfo() { Name = teamProjectItem.Name, WorkItemTypeInfos = null, Categories = null, ProcessConfig = null }
                                ).ToArray();
                        var projColInfo = new ProjectCollectionInfo() { Name = projectCollection.Key, TeamProjectInfos = teamProjectInfos };
                        projectCollectionInfos.Add(projColInfo);
                    }
                });

                Progress.NextStep();
            }
            finally
            {
                Progress.EndWorking();
            }

            return projectCollectionInfos.ToList();
        }
Ejemplo n.º 11
0
        public async Task ImportCategories(ITFManager tfManager, string projectCollectionName, string teamProjectName, string fileName)
        {
            string argument = string.Format("importcategories /collection:{0}/{1} /p:{2} /f:\"{3}\"", tfManager.TfsAddress, projectCollectionName, teamProjectName, fileName);

            await InvokeCommand(argument);
        }
Ejemplo n.º 12
0
        public async Task ExportProcessConfig(ITFManager tfManager, string projectCollectionName, string teamProjectName, string fileName)
        {
            string argument = string.Format("exportprocessconfig /collection:{0}/{1} /p:{2} /f:\"{3}\"", tfManager.TfsAddress, projectCollectionName, teamProjectName, fileName);

            await InvokeCommand(argument);
        }
Ejemplo n.º 13
0
 public async Task ExportProcessConfig(ITFManager tfManager, string projectCollectionName, string teamProjectName, string fileName)
 {
     string argument = string.Format("exportprocessconfig /collection:{0}/{1} /p:{2} /f:\"{3}\"", tfManager.TfsAddress, projectCollectionName, teamProjectName, fileName);
     await InvokeCommand(argument);
 }
Ejemplo n.º 14
0
 public async Task ImportCategories(ITFManager tfManager, string projectCollectionName, string teamProjectName, string fileName)
 {
     string argument = string.Format("importcategories /collection:{0}/{1} /p:{2} /f:\"{3}\"", tfManager.TfsAddress, projectCollectionName, teamProjectName, fileName);
     await InvokeCommand(argument);
 }