public void WriteMessage(LogEntry entry) { if (m_parent != null) { m_parent.WriteMessage(entry); } else { switch (entry.Level) { case LogMessageType.Error: m_errors.Add(entry.AsString(false)); break; case LogMessageType.Warning: m_warnings.Add(entry.AsString(false)); break; case LogMessageType.Information: m_messages.Add(entry.AsString(false)); break; } } }