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 OutputChannelBinder : IChannelBinder
15 IOutputChannel channel;
17 internal OutputChannelBinder(IOutputChannel channel)
21 Fx.Assert("OutputChannelBinder.OutputChannelBinder: (channel != null)");
22 throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("channel");
24 this.channel = channel;
27 public IChannel Channel
29 get { return this.channel; }
32 public bool HasSession
34 get { return this.channel is ISessionChannel<IOutputSession>; }
42 public EndpointAddress LocalAddress
46 #pragma warning suppress 56503 // Microsoft, the property is really not implemented, cannot lie, API not public
47 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
51 public EndpointAddress RemoteAddress
53 get { return this.channel.RemoteAddress; }
61 public void CloseAfterFault(TimeSpan timeout)
63 this.channel.Close(timeout);
66 public IAsyncResult BeginTryReceive(TimeSpan timeout, AsyncCallback callback, object state)
68 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
71 public bool EndTryReceive(IAsyncResult result, out RequestContext requestContext)
73 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
76 public RequestContext CreateRequestContext(Message message)
78 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
81 public IAsyncResult BeginSend(Message message, TimeSpan timeout, AsyncCallback callback, object state)
83 return this.channel.BeginSend(message, timeout, callback, state);
86 public void EndSend(IAsyncResult result)
88 this.channel.EndSend(result);
91 public void Send(Message message, TimeSpan timeout)
93 this.channel.Send(message, timeout);
96 public IAsyncResult BeginRequest(Message message, TimeSpan timeout, AsyncCallback callback, object state)
98 throw TraceUtility.ThrowHelperError(new NotImplementedException(), message);
101 public Message EndRequest(IAsyncResult result)
103 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
106 public bool TryReceive(TimeSpan timeout, out RequestContext requestContext)
108 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
111 public Message Request(Message message, TimeSpan timeout)
113 throw TraceUtility.ThrowHelperError(new NotImplementedException(), message);
116 public bool WaitForMessage(TimeSpan timeout)
118 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
121 public IAsyncResult BeginWaitForMessage(TimeSpan timeout, AsyncCallback callback, object state)
123 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
126 public bool EndWaitForMessage(IAsyncResult result)
128 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());