예제 #1
0
        public static async Task Main(string[] args)
        {
            var hostBuilder = MigrationToolHost.CreateDefaultBuilder(args)
                              .ConfigureServices((context, services) =>
            {
                // Field Mapps
                services.AddTransient <FieldBlankMap>();
                services.AddTransient <FieldLiteralMap>();
                services.AddTransient <FieldMergeMap>();
                services.AddTransient <FieldToFieldMap>();
                services.AddTransient <FieldtoFieldMultiMap>();
                services.AddTransient <FieldToTagFieldMap>();
                services.AddTransient <FieldValuetoTagMap>();
                services.AddTransient <MultiValueConditionalMap>();
                services.AddTransient <RegexFieldMap>();
                services.AddTransient <TreeToTagFieldMap>();

                // Processors

                //Engine
                services.AddSingleton <IMigrationEngine, MigrationEngineCore>();
                services.AddTransient <ITeamProjectContext, TeamProjectContext>();
            });
            var host           = hostBuilder.Build();
            var startupService = host.InitializeMigrationSetup(args);

            if (startupService == null)
            {
                return;
            }
            await host.RunAsync();

            startupService.RunExitLogic();
        }
예제 #2
0
        public static async Task Main(string[] args)
        {
            var hostBuilder = MigrationToolHost.CreateDefaultBuilder(args);

            if (hostBuilder is null)
            {
                return;
            }

            hostBuilder
            .ConfigureServices((context, services) =>
            {
                // Field Mapps
                services.AddTransient <FieldBlankMap>();
                services.AddTransient <FieldLiteralMap>();
                services.AddTransient <FieldMergeMap>();
                services.AddTransient <FieldToFieldMap>();
                services.AddTransient <FieldtoFieldMultiMap>();
                services.AddTransient <FieldToTagFieldMap>();
                services.AddTransient <FieldValuetoTagMap>();
                services.AddTransient <MultiValueConditionalMap>();
                services.AddTransient <RegexFieldMap>();
                services.AddTransient <TreeToTagFieldMap>();

                // Processors

                // Core
                // services.AddTransient<IMigrationClient, MigrationRestClient>();
            });
            await hostBuilder.RunMigrationTools(args);
        }
예제 #3
0
        public static async Task Main(string[] args)
        {
            var hostBuilder = MigrationToolHost.CreateDefaultBuilder(args)
                              .ConfigureServices((context, services) =>
            {
                // Field Mapps
                services.AddTransient <FieldBlankMap>();
                services.AddTransient <FieldLiteralMap>();
                services.AddTransient <FieldMergeMap>();
                services.AddTransient <FieldToFieldMap>();
                services.AddTransient <FieldtoFieldMultiMap>();
                services.AddTransient <FieldToTagFieldMap>();
                services.AddTransient <FieldValuetoTagMap>();
                services.AddTransient <FieldToFieldMap>();
                services.AddTransient <FieldValueMap>();
                services.AddTransient <MultiValueConditionalMap>();
                services.AddTransient <RegexFieldMap>();
                services.AddTransient <TreeToTagFieldMap>();

                //Processors
                services.AddSingleton <WorkItemMigrationContext>();
                services.AddSingleton <TeamMigrationContext>();
                services.AddSingleton <TestConfigurationsMigrationContext>();
                services.AddSingleton <TestPlandsAndSuitesMigrationContext>();
                services.AddSingleton <TestVeriablesMigrationContext>();
                services.AddSingleton <WorkItemPostProcessingContext>();
                services.AddSingleton <WorkItemQueryMigrationContext>();
                services.AddSingleton <CreateTeamFolders>();
                services.AddSingleton <ExportProfilePictureFromADContext>();
                services.AddSingleton <ExportTeamList>();
                services.AddSingleton <FixGitCommitLinks>();
                services.AddSingleton <ImportProfilePictureContext>();
                services.AddSingleton <WorkItemDelete>();
                services.AddSingleton <WorkItemUpdate>();
                services.AddSingleton <WorkItemUpdateAreasAsTagsContext>();

                // Core
                services.AddTransient <IMigrationClient, MigrationClient>();
                services.AddTransient <IWorkItemMigrationClient, WorkItemMigrationClient>();
                services.AddTransient <ITestPlanMigrationClient, TestPlanMigrationClient>();
                services.AddTransient <IWorkItemQueryBuilder, WorkItemQueryBuilder>();
                services.AddTransient <IWorkItemQuery, WorkItemQuery>();
            });
            var host           = hostBuilder.Build();
            var startupService = host.InitializeMigrationSetup(args);

            if (startupService == null)
            {
                return;
            }
            await host.RunAsync();

            startupService.RunExitLogic();
        }
예제 #4
0
        public static async Task Main(string[] args)
        {
            var hostBuilder = MigrationToolHost.CreateDefaultBuilder(args)
                              .ConfigureServices((context, services) =>
            {
                // Field Mapps
                services.AddTransient <FieldBlankMap>();
                services.AddTransient <FieldLiteralMap>();
                services.AddTransient <FieldMergeMap>();
                services.AddTransient <FieldToFieldMap>();
                services.AddTransient <FieldtoFieldMultiMap>();
                services.AddTransient <FieldToTagFieldMap>();
                services.AddTransient <FieldValuetoTagMap>();
                services.AddTransient <FieldToFieldMap>();
                services.AddTransient <FieldValueMap>();
                services.AddTransient <MultiValueConditionalMap>();
                services.AddTransient <RegexFieldMap>();
                services.AddTransient <TreeToTagFieldMap>();

                //Processors
                services.AddSingleton <WorkItemMigrationContext>();
                services.AddSingleton <TeamMigrationContext>();
                services.AddSingleton <TestConfigurationsMigrationContext>();
                services.AddSingleton <TestPlandsAndSuitesMigrationContext>();
                services.AddSingleton <TestVeriablesMigrationContext>();
                services.AddSingleton <WorkItemPostProcessingContext>();
                services.AddSingleton <WorkItemQueryMigrationContext>();
                services.AddSingleton <CreateTeamFolders>();
                services.AddSingleton <ExportProfilePictureFromADContext>();
                services.AddSingleton <ExportTeamList>();
                services.AddSingleton <FixGitCommitLinks>();
                services.AddSingleton <ImportProfilePictureContext>();
                services.AddSingleton <WorkItemDelete>();
                services.AddSingleton <WorkItemUpdate>();
                services.AddSingleton <WorkItemUpdateAreasAsTagsContext>();

                // Enrichers
                services.AddSingleton <TfsWorkItemLinkEnricher>();
                services.AddSingleton <TfsEmbededImagesEnricher>();
                services.AddSingleton <TfsGitRepositoryEnricher>();
                services.AddSingleton <TfsNodeStructureEnricher>();

                // Core
                services.AddTransient <IMigrationClient, TfsMigrationClient>();
                services.AddTransient <IWorkItemMigrationClient, TfsWorkItemMigrationClient>();
                services.AddTransient <ITestPlanMigrationClient, TfsTestPlanMigrationClient>();
                services.AddTransient <IWorkItemQueryBuilder, WorkItemQueryBuilder>();
                services.AddTransient <IWorkItemQuery, TfsWorkItemQuery>();
            });

            await hostBuilder.RunMigrationTools(args);
        }
예제 #5
0
        public static async Task Main(string[] args)
        {
            var hostBuilder = MigrationToolHost.CreateDefaultBuilder(args)
                              .ConfigureServices((context, services) =>
            {
                // New v2 Architecture fpr testing
                services.AddMigrationToolServicesForClientFileSystem();
                services.AddMigrationToolServicesForClientAzureDevOpsObjectModel();

                // v1 Architecture (Legacy)
                services.AddMigrationToolServicesForClientLegacyAzureDevOpsObjectModel();
                services.AddMigrationToolServicesForClientLegacyCore();
            });

            await hostBuilder.RunMigrationTools(args);
        }
 public void Setup()
 {
     host = MigrationToolHost.CreateDefaultBuilder(new string[] { "execute", "-c", "configuration.json" }).Build();
 }
예제 #7
0
 public void Setup()
 {
     host = MigrationToolHost.CreateDefaultBuilder(new string[0]).Build();
 }