Esempio n. 1
0
        private static void performExport(string[] args)
        {
            try
            {
                var tfsServerUrl = args[1];
                var tfsProject   = args[2];
                var azureUrl     = args[3];
                var azureProject = args[4];

                Logger.Info($"Export backlogs and workitems{Environment.NewLine}--------------------------------------------------------------------------------");

                Logger.Info($"TFS Server URL: {tfsServerUrl}");
                Logger.Info($"TFS Project:    {tfsProject}");
                Logger.Info($"Azure URL:      {azureUrl}");
                Logger.Info($"Azure Project:  {azureProject}");

                var azureClient = new AzureDevopsClient.Client(azureUrl, azureProject);
                azureClient.Connect();
                azureClient.Initialize();

                var tfs2015Client = new Tfs2015Client.Client(tfsServerUrl, tfsProject);
                tfs2015Client.Connect();
                tfs2015Client.Initialize();

                azureClient.CreateAreas(tfs2015Client.GetAreas());
                azureClient.CreateIterations(tfs2015Client.GetIterations());

                azureClient.CreateWorkitems(tfs2015Client.GetWorkitems());
            }
            catch (Exception e)
            {
                Logger.Error($"{e.Message}{Environment.NewLine}{e.StackTrace}");
            }
        }
Esempio n. 2
0
        private static void performHistory(string[] args)
        {
            Logger.Info($"Export changeset history{Environment.NewLine}--------------------------------------------------------------------------------");

            var tfsServerUrl = args[1];
            var tfsProject   = args[2];
            var tfsBranch    = args[3];
            var dateFrom     = DateTime.Parse(args[4]);
            var dateTo       = DateTime.Parse(args[5]);
            var path         = args[6];

            Logger.Info($"TFS Server URL: {tfsServerUrl}");
            Logger.Info($"TFS project:    {tfsProject}");
            Logger.Info($"TFS branch:     {tfsBranch}");
            Logger.Info($"Date from-to:   {dateFrom.ToShortDateString()} - {dateTo.ToShortDateString()}");
            Logger.Info($"Output path:    {path}");

            var tfs2015Client = new Tfs2015Client.Client(tfsServerUrl, tfsProject);

            tfs2015Client.Connect();

            tfs2015Client.ExportHistory(tfsBranch, dateFrom, dateTo, path);
        }