コード例 #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));
        }