Пример #1
0
 public virtual Message AddMessage(Message message)
 {
     message.Author = this;
     message.NrOrder = Messages.Count() + 1;
     Messages.Add(message);
     return message;
 }
Пример #2
0
        public virtual Message AddMessage(Author author, Message message)
        {
            message.Author = author;
            message.ParentMessage = this;
            message.NrOrder = Messages.Count() + 1;
            Messages.Add(message);

            author.Messages.Add(message);
            return message;
        }
Пример #3
0
 public virtual Message AddMessage(Message message)
 {
     message.ParentMessage = this;
     Messages.Add(message);
     return message;
 }
Пример #4
0
 private static Message AddMessage(Author author, Message msg, string text, DateTime createdOn)
 {
     return msg.AddMessage(author, new Message() { Text = text, CreatedOn = createdOn });
 }