Exemplo n.º 1
0
        private static async Task RunOperationInternal(string indexName, string configsFileDir)
        {
            // load configs and schema
            var appConfigs = await LoadAndValidateConfigs(configsFileDir);

            var selectedProjects = SelectedProjectsLoader.LoadSelectedProjects(appConfigs.CustomText.Projects);
            var customTextSchema = await LoadAndValidateAppSchema(appConfigs, selectedProjects);

            // build dependencies
            var container = DependencyInjector.BuildDependencies(appConfigs);

            // run
            using (var scope = container.BeginLifetimeScope())
            {
                var orchestrator = scope.Resolve <IndexingOrchestrator>();
                await orchestrator.IndexCustomText(indexName, customTextSchema, selectedProjects);
            }
        }