LogStringBuilder.cs 587 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace UAS_MES.PublicMethod
  6. {
  7. class LogStringBuilder
  8. {
  9. StringBuilder sql;
  10. public LogStringBuilder()
  11. {
  12. sql = new StringBuilder();
  13. }
  14. public void Append(string str)
  15. {
  16. sql.Append(str);
  17. }
  18. public void Clear()
  19. {
  20. sql.Clear();
  21. }
  22. public string GetString()
  23. {
  24. LogManager.DoSQLLog(sql.ToString());
  25. return sql.ToString();
  26. }
  27. }
  28. }