comparison ServerMonitor/Objects/CheckResult.cs @ 2:453ecc1ed9ea

Disk space check
author Brad Greco <brad@bgreco.net>
date Sun, 06 Jan 2019 20:49:08 -0500
parents 3e1a2131f897
children 96f0b028176d
comparison
equal deleted inserted replaced
1:9e92780ebc0f 2:453ecc1ed9ea
30 return string.Format("{0:00000} {1} {2} {3} {4}", 30 return string.Format("{0:00000} {1} {2} {3} {4}",
31 Check.Id, 31 Check.Id,
32 StartTime.ToString(dateFormat).Replace("T", " "), 32 StartTime.ToString(dateFormat).Replace("T", " "),
33 EndTime.ToString(dateFormat).Replace("T", " "), 33 EndTime.ToString(dateFormat).Replace("T", " "),
34 CheckStatus, 34 CheckStatus,
35 Message.Replace("\r\n", "\n").Replace('\r', '\n').Replace("\n", "\\n")); 35 Message.ConvertNewlines().Replace("\n", "\\n"));
36 } 36 }
37 37
38 public static CheckResult FromLogString(Check check, string logString) 38 public static CheckResult FromLogString(Check check, string logString)
39 { 39 {
40 DateTime startTime = DateTime.Parse(logString.Substring(6, 23)); 40 DateTime startTime = DateTime.Parse(logString.Substring(6, 23));