2009-05-22 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Fri, 22 May 2009 05:19:10 +0000 (05:19 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Fri, 22 May 2009 05:19:10 +0000 (05:19 -0000)
* ChannelManagerBase.cs : fix wrong session channel detection.

svn path=/trunk/mcs/; revision=134588

mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog
mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChannelManagerBase.cs

index 5cf60b70b03b29d89e97da3bcb49ae7a06704bc2..402a4cdaa8bf9f1340db49a94b8ecda2d2f301f4 100755 (executable)
@@ -1,3 +1,7 @@
+2009-05-22  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * ChannelManagerBase.cs : fix wrong session channel detection.
+
 2009-05-22  Atsushi Enomoto  <atsushi@ximian.com>
 
        * BinaryMessageEncoderFactory.cs, BinaryMessageEncoder.cs
index d7e9462d3b042ab8188d9e492360dda9eeeb6363..5defd21bb9c0befd87b1e8f1fed3021058184efe 100644 (file)
@@ -63,11 +63,12 @@ namespace System.ServiceModel.Channels
                internal MessageEncoder CreateEncoder<TChannel> (MessageEncodingBindingElement mbe)
                {
                        var f = mbe.CreateMessageEncoderFactory ();
-                       if (this is IRequestSessionChannel ||
-                           this is IReplySessionChannel ||
-                           this is IInputSessionChannel ||
-                           this is IOutputSessionChannel ||
-                           this is IDuplexSessionChannel)
+                       var t = typeof (TChannel);
+                       if (t == typeof (IRequestSessionChannel) ||
+                           t == typeof (IReplySessionChannel) ||
+                           t == typeof (IInputSessionChannel) ||
+                           t == typeof (IOutputSessionChannel) ||
+                           t == typeof (IDuplexSessionChannel))
                                return f.CreateSessionEncoder ();
                        else
                                return f.Encoder;