Fix NET_2_1 builds.
authorAtsushi Eno <atsushieno@veritas-vos-liberabit.com>
Tue, 25 Oct 2011 15:35:57 +0000 (00:35 +0900)
committerAtsushi Eno <atsushieno@veritas-vos-liberabit.com>
Tue, 25 Oct 2011 15:35:57 +0000 (00:35 +0900)
mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs

index 1cb5eef442bd0ca4056f405f44dd12a337d66120..fde0297a29c656b97fbe39b1da5423a763653127 100644 (file)
@@ -386,10 +386,12 @@ namespace System.ServiceModel.Dispatcher
                                        throw new ArgumentNullException ("parameters");
                                CheckMessageVersion (message.Version);
 
+#if !NET_2_1
                                if (OperationContext.Current != null) {
                                        // Set response in the context
                                        OperationContext.Current.IncomingMessage = message;
                                }
+#endif
 
                                if (message.IsEmpty)
                                        return null; // empty message, could be returned by HttpReplyChannel.