Пример #1
0
 public MessageBase()
 {
     Header = new THeader()
     {
         Type = MessageTypeAttribute.GetMessageTypeForType(GetType())
     };
 }
Пример #2
0
        private static IMessage CreateFromMessageType(MessageType messageType)
        {
            var type = MessageTypeAttribute.GetTypeForMessageType(messageType);

            if (type == null)
            {
                return(null);
            }

            return((IMessage)Activator.CreateInstance(type));
        }