Exemple #1
0
        public void PrintMessage(IEnumerable <Message> messages)
        {
            DateTime now = _dateTimeHelper.CurrentDateTime;

            foreach (var message in messages.OrderByDescending(m => m.CreatedDate))
            {
                string humanizedTimeSpan = GetHumanizedTimeSpan(now.Subtract(message.CreatedDate));
                var    formattedMessage  = string.Format("{0} ({1} ago)", message.Text, humanizedTimeSpan);
                _printerHelper.WriteLine(formattedMessage);
            }
        }
Exemple #2
0
 public void Execute()
 {
     _printerHelper.WriteLine("Unrecognized command");
 }