/// <summary> /// Begins the IO process. /// </summary> public static void Begin() { Console.OutputEncoding = Encoding.UTF8; DisplayInitialMessage(); PromptUserForInput(true); GetData(); WriteFile(WishData.GetPath(), WishData.GetData(), ConnectionManager.GetWebClient()); AlphabetizeFile(); DisplayOutput(WishData.GetAllData()); }
/// <summary> /// Sorts the output file alphabetically. /// </summary> private static void AlphabetizeFile() { WishData.SetAllData(File.ReadAllLines(WishData.GetPath())); Array.Sort(WishData.GetAllData()); File.WriteAllText(WishData.GetPath(), string.Join("\n", WishData.GetAllData())); }