public static void WriteToFile() { if (_file == null) return; Sqls.Sort(); foreach (var sql in Sqls) _file.WriteLine(sql); Flush(); }