public static string GetCustomArguments(string filePath) { if (!File.Exists(customArgumentsFilePath)) { return(DefaultArguments); } var lines = File.ReadAllLines(customArgumentsFilePath); if (FindArguments(lines, filePath, out string arguments, out int index)) { return(arguments); } var mostRecentArguments = TextUtilities.ParseNameValue(lines[0]); return(mostRecentArguments.Value); }
public static string GetCustomArguments(string filePath) { string[] lines; using (SingleGlobalInstance.Acquire(Path.GetFileName(customArgumentsFilePath))) { if (!File.Exists(customArgumentsFilePath)) { return(DefaultArguments); } lines = File.ReadAllLines(customArgumentsFilePath); } if (FindArguments(lines, filePath, out string?arguments, out int index)) { return(arguments); } var mostRecentArguments = TextUtilities.ParseNameValue(lines[0]); return(mostRecentArguments.Value); }