示例#1
0
 /// <summary>
 /// This method adds an externally generated message to the instance
 /// </summary>
 /// <param name="message"></param>
 /// <returns></returns>
 public Guid WithMessage(Helper.Message message)
 {
     // Instantiate the message and add it to the list
     _messageList.Add(message);
     // We're done, return the unique ID of the message
     return(message.Id);
 }
示例#2
0
 /// <summary>
 /// This method logs an external message construct
 /// </summary>
 /// <param name="message"></param>
 /// <returns></returns>
 public Runner LogMessage(Helper.Message message)
 {
     // Check for a message
     if (message != null)
     {
         // Write the message to the console console
         Console.WriteLine($"\n{message.ToString()}");
         // Reset the sent timestamp on the message
         message.Sent = DateTime.UtcNow;
     }
     // We're done, return the instance
     return(this);
 }
示例#3
0
 public Runner LogPriorityMessage(Helper.Message message) =>
 LogMessage(message.WithPriority());