1 //-----------------------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation. All rights reserved.
3 //-----------------------------------------------------------------------------
5 namespace System.ServiceModel.Dispatcher
9 using System.ServiceModel;
10 using System.ServiceModel.Channels;
11 using System.ServiceModel.Diagnostics;
13 class ReplyChannelBinder : IChannelBinder
15 IReplyChannel channel;
18 internal ReplyChannelBinder(IReplyChannel channel, Uri listenUri)
22 Fx.Assert("ReplyChannelBinder.ReplyChannelBinder: (channel != null)");
23 throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("channel");
25 this.channel = channel;
26 this.listenUri = listenUri;
29 public IChannel Channel
31 get { return this.channel; }
34 public bool HasSession
36 get { return this.channel is ISessionChannel<IInputSession>; }
41 get { return this.listenUri; }
44 public EndpointAddress LocalAddress
46 get { return this.channel.LocalAddress; }
49 public EndpointAddress RemoteAddress
53 #pragma warning suppress 56503 // [....], the property is really not implemented, cannot lie, API not public
54 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
63 public void CloseAfterFault(TimeSpan timeout)
65 this.channel.Close(timeout);
68 public IAsyncResult BeginTryReceive(TimeSpan timeout, AsyncCallback callback, object state)
70 return this.channel.BeginTryReceiveRequest(timeout, callback, state);
73 public bool EndTryReceive(IAsyncResult result, out RequestContext requestContext)
75 return this.channel.EndTryReceiveRequest(result, out requestContext);
78 public RequestContext CreateRequestContext(Message message)
80 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
83 public IAsyncResult BeginSend(Message message, TimeSpan timeout, AsyncCallback callback, object state)
85 throw TraceUtility.ThrowHelperError(new NotImplementedException(), message);
88 public void EndSend(IAsyncResult result)
90 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
93 public void Send(Message message, TimeSpan timeout)
95 throw TraceUtility.ThrowHelperError(new NotImplementedException(), message);
98 public IAsyncResult BeginRequest(Message message, TimeSpan timeout, AsyncCallback callback, object state)
100 throw TraceUtility.ThrowHelperError(new NotImplementedException(), message);
103 public Message EndRequest(IAsyncResult result)
105 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
108 public bool TryReceive(TimeSpan timeout, out RequestContext requestContext)
110 return this.channel.TryReceiveRequest(timeout, out requestContext);
113 public Message Request(Message message, TimeSpan timeout)
115 throw TraceUtility.ThrowHelperError(new NotImplementedException(), message);
118 public bool WaitForMessage(TimeSpan timeout)
120 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
123 public IAsyncResult BeginWaitForMessage(TimeSpan timeout, AsyncCallback callback, object state)
125 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
128 public bool EndWaitForMessage(IAsyncResult result)
130 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());