private static string NormalizeLineEndings(string value) { if (value != null) { value = value.Replace("\r\n", "\n"); value = value.Replace("\r", string.Empty); return value.Replace("\n", "\r\n"); } return string.Empty; }