private void _AddMessageToChat(ChatModel chatModel, MessageModel msg)
{
ChatView chatView = _ChatViewManager.GetChat(chatModel);
if (chatView == null)
{
#if LOG4NET
_Logger.Fatal(
String.Format(
"_AddMessageToChat(): " +
"_ChatViewManager.GetChat(chatModel) " +
"chatModel.Name: {0} returned null!",
chatModel.Name
)
);
#endif
return;
}
#if LOG4NET && MSG_DEBUG
DateTime start, stop;
start = DateTime.UtcNow;
#endif
chatView.AddMessage(msg);
#if LOG4NET && MSG_DEBUG
stop = DateTime.UtcNow;
_Logger.Debug(
String.Format(
"_AddMessageToChat(): chatView.AddMessage() took: {0:0.00} ms",
(stop - start).TotalMilliseconds
)
);
#endif
}