public List <SolutionImportResult> ImportSolutions( string logsFolder, string configFilePath) { if (!Directory.Exists(logsFolder)) { throw new Exception($"{logsFolder} does not exist"); } if (!File.Exists(configFilePath)) { throw new Exception($"{configFilePath} does not exist"); } Logger.LogVerbose("Parsing import json file {0}", configFilePath); SolutionImportConfig config = Serializers.ParseJson <SolutionImportConfig>(configFilePath); Logger.LogVerbose("Finished parsing import json file {0}", configFilePath); Logger.LogVerbose("{0} solution for import found", config.Solutions.Count); FileInfo configInfo = new FileInfo(configFilePath); List <SolutionImportResult> results = ImportSolutions( configInfo.Directory.FullName, logsFolder, config); return(results); }
public List <SolutionImportResult> ImportSolutions( string importFolder, string logsFolder, SolutionImportConfig config) { List <SolutionImportResult> results = new List <SolutionImportResult>(); foreach (SolutionImportOptions option in config.Solutions) { results.Add(ImportSolution( importFolder, logsFolder, option)); } return(results); }
public List <SolutionImportResult> ImportSolutions( string importFolder, string logsFolder, SolutionImportConfig config) { List <SolutionImportResult> results = new List <SolutionImportResult>(); foreach (SolutionImportOptions option in config.Solutions) { SolutionImportResult result = ImportSolution( importFolder, logsFolder, option); results.Add(result); if (!result.Success) { break; } } return(results); }