Given this event
public class DummyEvent : EventDTO{
public CustomUUID Cid { get; set; }
public DateTime Date { get; set; }
public Guid Id { get; set; }
}
I’m sending messages via MSMQ:
var de = new DummyEvent {
Date = DateTime.UtcNow,
Id = Guid.NewGuid(),
Cid = Guid.NewGuid()
};
var mq = new MessageQueue(AppSettings.EventQueue);
mq.Formatter = new XmlMessageFormatter(new[]{de.GetType()});
mq.Send(de);
var e = reciever.Receive().Body;
Date is System.DateTime so it gets deserialized ok.
Id is System.Guid so it gets deserialized ok.
Cid is CustomUUID which is a user defined type that doesnt get deserialized.
I need to send customer-defined types as well, but there is scarce info on the net.
EDIT: It actually doesn’t get serialized, so the problem is at Sending the message
Here is the sample