using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SciServer.Logging
{
    public class Message
    {
        public Guid MessageId;
        public MessageType MessageType;
        public DateTime Time;
        public string Host;
        public string Application;
        public string Method;
        public string UserId;
        public MessageBody MessageBody;

        public string GetTypeName()
        {
            if (this.MessageType != MessageType.CUSTOM) return this.MessageType.ToString();
            else return (MessageBody as CustomMessageBody).CustomType;
        }
    }
}
