/// <summary>
        /// Writes Messages to file
        /// </summary>
        /// <param name="message"></param>
        public void WriteMessageLog(Message message)
        {
            if (!Directory.Exists("ChatLogs"))
            {
                Directory.CreateDirectory("ChatLogs");
            }
            var filePath = string.Format("ChatLogs\\Chats_On_{0}.txt",
                    DateTime.Now.Date.ToString("MM-dd-yyyy"));

            using (var file = new StreamWriter(filePath, true))
            {
                file.WriteLine(string.Format("[{0}]: From: [{1}], To: [{2}], Message: [{3}]"
                    , DateTime.Now.ToString(@"M/d/yyyy hh:mm:ss tt")
                    , message.MessageFrom.UserName,message.MessageTo.UserName,message.MessageText));
            }
        }
 /// <summary>
 /// Adds to message list
 /// </summary>
 /// <param name="message"></param>
 public bool AddToMessageList(Message message)
 {
     try
     {
         if (UserConnection.ConnectedUsers.Any(e => e.UserId == message.MessageTo.UserId))
         {
             MessageList.Add(message);
             _logger.WriteMessageLog(message);
             return true;
         }
         return false;
     }
     catch (Exception ex)
     {
         _logger.NLog(Logger, Enums.NLogType.Error, ex.Message);
         _logger.NLog(Logger, Enums.NLogType.Stacktrace, ex.StackTrace);
         _logger.LogToConsole(Enums.NLogType.Error, "Error occurred while trying to add new message");
         throw;
     }
 }