daxnet/Apworks

Issues when casting object to messages

Opened this issue · 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.

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

daxnet已修复