Issues when casting object to messages
Opened this issue · 2 comments
FerminYang commented
Apworks\Bus\MessageDispatcher.cs
Line 174
Type messageType = typeof(T);
Here the T is always "object", and the if condition below will never be true.
This issue is caused by : Apworks.Bus.DirectBus\DirectBus.cs
Line 40
private readonly Queue<object> messageQueue = new Queue<object>();
Change it to:
private readonly Queue<dynamic> messageQueue = new Queue<dynamic>();
Will fix it.
This issue also exists in MSMQ Bus.
daxnet commented
Thank you for committing the issue here, and I will investigate the issues and get them fixed.
anycmd commented
daxnet已修复