Mercurial > servermonitor
diff ServerMonitor/Helpers.cs @ 2:453ecc1ed9ea
Disk space check
author | Brad Greco <brad@bgreco.net> |
---|---|
date | Sun, 06 Jan 2019 20:49:08 -0500 |
parents | 3e1a2131f897 |
children | 3142e52cbe69 |
line wrap: on
line diff
--- a/ServerMonitor/Helpers.cs Tue Jan 01 21:14:47 2019 -0500 +++ b/ServerMonitor/Helpers.cs Sun Jan 06 20:49:08 2019 -0500 @@ -31,6 +31,11 @@ return aString == null || aString.Trim() == string.Empty; } + public static string ConvertNewlines(this string aString) + { + return aString.Replace("\r\n", "\n").Replace('\r', '\n'); + } + public static T GetAttribute<T>(this Type type) where T : Attribute { return type.GetCustomAttributes(typeof(T), false).SingleOrDefault() as T;