NServiceBus chokes on Generic DTO

≡放荡痞女 提交于 2019-12-25 11:57:44

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!