public MessageBase() { Header = new THeader() { Type = MessageTypeAttribute.GetMessageTypeForType(GetType()) }; }
private static IMessage CreateFromMessageType(MessageType messageType) { var type = MessageTypeAttribute.GetTypeForMessageType(messageType); if (type == null) { return(null); } return((IMessage)Activator.CreateInstance(type)); }