public static TestTitleData Load(Dictionary <string, string> argsLc) { if (testTitleData != null) { return(testTitleData); } JenkinsConsoleUtility.TryGetArgVar(out string workspacePath, argsLc, "WORKSPACE"); JenkinsConsoleUtility.TryGetArgVar(out string titleDataPath1, argsLc, "testTitleData"); JenkinsConsoleUtility.TryGetArgVar(out string titleDataPath2, argsLc, "PF_TEST_TITLE_DATA_JSON"); // If testTitleData or PF_TEST_TITLE_DATA_JSON path is provided, save the path and try to load it HashSet <string> validFilepaths = new HashSet <string>(); AddValidPath(validFilepaths, titleDataPath1, workspacePath); AddValidPath(validFilepaths, titleDataPath2, workspacePath); // Load the first file path that works foreach (var validFilepath in validFilepaths) { _LoadTestTitleData(validFilepath); if (testTitleData != null) { return(testTitleData); } } JcuUtil.FancyWriteToConsole(ConsoleColor.Red, "ERROR: Could not load testTitleData.", ConsoleColor.Yellow, "WORKSPACE=", ConsoleColor.White, workspacePath, ConsoleColor.Yellow, "testTitleData=", ConsoleColor.White, titleDataPath1, ConsoleColor.Yellow, "PF_TEST_TITLE_DATA_JSON=", ConsoleColor.White, titleDataPath2, ConsoleColor.Yellow, "validFilepaths=", ConsoleColor.White, validFilepaths); return(null); }