« first day (6 days earlier)    last day (43 days later) » 

11:05 PM
So I've started on part of it, and I've got a few of the pieces together:
    public abstract class Message
    {
        public List<MessageNode> Nodes { get; }

        public override string ToString()
        {
            var sb = new StringBuilder();

            foreach (MessageNode node in Nodes)
            {
                sb.Append(node.ToString());
            }

            return sb.ToString();
        }

        public abstract string ToFormattedString();
    }
public class MessageNode
{
    public string Text { get; }
    public FormatType FormatType { get; }
}
public enum FormatType
{
    PlainText,
    Error,
    Alert,
    Warning,
}
I think I like this idea, rather than passing specific properties for whether or not to bold, italicize, change colorus, etc. as this allows the implementing context to determine how to format the message based on it's capabilities, rather than some random stuff some programmer decided.
The context to write a message looks like this (so far):
public interface IWritableMessagingContext
{
    bool WriteMessage(string destination, Message message);
}
Where destination is the place to send it, be it a user, a channel, a room, etc.
I'm not sure if destination should be a custom class or not, though. I suppose I'll wait and see what I end up doing with an actual implementation of it first.
 

« first day (6 days earlier)    last day (43 days later) »