Apworks icon indicating copy to clipboard operation
Apworks copied to clipboard

Issues when casting object to messages

Open FerminYang opened this issue 11 years ago • 2 comments

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.

FerminYang avatar Jun 08 '13 04:06 FerminYang

Thank you for committing the issue here, and I will investigate the issues and get them fixed.

daxnet avatar Jul 02 '13 00:07 daxnet

daxnet已修复

anycmd avatar Nov 06 '15 08:11 anycmd