在 NServiceBus 中接收消息时列表值丢失

发布于 2024-10-08 21:12:47 字数 140 浏览 0 评论 0原文

我的消息对象有一个列表和一些属性。说“列出我的列表”。我将此消息发送到队列。 NSBHandler 接收此消息。但收到的消息中缺少 MyList。所有其他属性都存在。

谁能帮我解决这个问题?

提前致谢。

雷金·坦加拉吉

My message object has a list and some properties. Say List MyList. I send this message to a queue. NSBHandler receives this message. But MyList is missing in that received message. All other properties exist.

Can anyone help me to resolve this issue?

Thanks in advance.

Regin Thangaraj

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

千寻… 2024-10-15 21:12:47

如果您使用了自动属性并且这样做了:

public List<Stuff> MyListOfStuff { get; private set; }

那么 NServiceBus 将在序列化时跳过它,因为它知道在反序列化时它将无法使用私有设置器设置该属性。

If you've used an auto property and you've done it like this:

public List<Stuff> MyListOfStuff { get; private set; }

Then NServiceBus will skip it on serialization as it knows that on deserilization it will won't be able to set the property with the private setter..

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文