/// <summary>
 /// Called when [collection changed].
 /// </summary>
 /// <param name="message">The message.</param>
 private void OnCollectionChanged(Message message)
 {
     NotifyCollectionChangedEventHandler handler = CollectionChanged;
     if (handler != null)
     {
         handler(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, message));
     }
 }
 /// <summary>
 /// Writes the message.
 /// </summary>
 /// <param name="message">The message.</param>
 private void WriteMessage(Message message)
 {
     Messages.Insert(0, message);
     OnCollectionChanged(message);
 }