This project is read-only.

Trouble with ReplySessionChannel

May 7, 2009 at 4:09 PM

I was trying to get this very nice piece of work activated on a security enabled service, and I kept running into this InvalidCastException in the base ctor for  CompressionChannel:
Ln 26:
var listener = (CompressionChannelListener<TChannelShape>)channelManager;

Telling me CompressionChannelListener<IReplySessionChannel>  cannot be casted to CompressionChannelListener<IReplyChannel>

After some further look, this got solved by changing the definition for CompressionReplyChannel, from
internal class CompressionReplyChannel : CompressionChannel<IReplyChannel>, IReplyChannel
internal class CompressionReplyChannel<TChannelShape> : CompressionChannel<TChannelShape>, IReplyChannel

So the derived CompressionReplySessionChannel can use the correct types.
I noticed that other types of session channels are already coded this way, so I suppose this is just a small oversight.

Just wanted to let you know, thanks for the great work!

Btw, am I correctly assuming that currently the CompressionLevel (Normal, Fast, Maximum) is not yet being used?