问题
If I have a DTO that looks like this:
public class MyMessage<TContent> : Message
{
public TContent Content {get;set;}
}
NServiceBus chokes trying to dynamically generate concrete definition for TContent at startup - which's obviously impossible - unless it's smart enough to not only parse Types but also opcodes and I don't think we're there yet.
Is there a way around this or I simply can't have generics in my DTOs?
来源:https://stackoverflow.com/questions/19258936/nservicebus-chokes-on-generic-dto