2010-06-21 Atsushi Enomoto <atsushi@ximian.com>
[mcs.git] / class / System.ServiceModel / System.ServiceModel.Dispatcher / ReplyHandler.cs
blob59f9622ee5863fafa38ccefa716006361b293ca4
1 /*
2 using System;
3 using System.Collections.Generic;
4 using System.Text;
5 using System.ServiceModel.Channels;
6 using System.ServiceModel;
8 namespace System.ServiceModel.Dispatcher
10 internal class ReplyHandler : BaseRequestProcessorHandler
12 IDuplexChannel duplex;
14 public ReplyHandler (IChannel channel)
16 duplex = channel as IDuplexChannel;
19 protected override bool ProcessRequest (MessageProcessingContext mrc)
21 // if IsOneWay then no need to handle reply
22 if (mrc.Operation.IsOneWay)
23 return false;
25 if (duplex != null)
26 mrc.Reply (duplex, true);
27 else
28 mrc.Reply (true);
29 return false;