private static void CheckForLine(StringBuilder found, List <string> contentList, bool ignoreCase) { string foundUse = found.ToString(); if (ignoreCase == true) { foundUse = foundUse.ToUpper(); } foreach (string line in contentList) { string lineUse = line; if (ignoreCase == true) { lineUse = lineUse.ToUpper(); } if (!foundUse.Contains(lineUse.Trim())) { int sc = Errors.GetStatusCode("MissingContent"); if (sc != 0) { Console.ForegroundColor = Errors.GetColorByStatus(sc); Console.WriteLine("File does not contain specified content!"); Console.ForegroundColor = ConsoleColor.Gray; Console.WriteLine(line); Console.ResetColor(); Errors.MissingContent(); } } } }
private static void ContentsMatch(bool result) { if (result == false) { int sc = Errors.GetStatusCode("MissingContent"); if (sc != 0) { Console.ForegroundColor = Errors.GetColorByStatus(sc); Console.WriteLine("File contents do not match!"); Console.ResetColor(); Errors.MissingContent(); } } else { Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("Contents match."); Console.ResetColor(); } }