Example #1
0
        public void Execute(string[] args)
        {
            ICollection <ProjectDefinition> projectList = TeamProjectHelper.GetAllProjects(configurationServer);

            using (CsvWriter csv = new CsvWriter(new StreamWriter(Path.Combine(Environment.GetEnvironmentVariable("TfsExtractPath", EnvironmentVariableTarget.User), Environment.GetEnvironmentVariable("TfsExtractProjectList", EnvironmentVariableTarget.User)))))
            {
                csv.Configuration.RegisterClassMap <ProjectDefinitionCsvMap>();
                csv.WriteRecords(projectList);
            }
        }
        public void Execute()
        {
            logger.Info("Extract Project List in progress...");
            ICollection <ProjectDefinition> projectList = TeamProjectHelper.GetAllProjects(configurationServer);

            string fileName = FileNameTool.GetFileName("TfsExtractProjectList");

            using (CsvWriter csv = new CsvWriter(new StreamWriter(fileName)))
            {
                csv.Configuration.RegisterClassMap <ProjectDefinitionCsvMap>();
                csv.WriteExcelSeparator();
                csv.WriteRecords(projectList);
            }

            logger.Info("Extract Project done");
        }