Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Dispatcher / RequestChannelBinder.cs / 1 / RequestChannelBinder.cs
//------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
namespace System.ServiceModel.Dispatcher
{
using System;
using System.ServiceModel;
using System.ServiceModel.Channels;
class RequestChannelBinder : IChannelBinder
{
IRequestChannel channel;
internal RequestChannelBinder(IRequestChannel channel)
{
if (!((channel != null)))
{
DiagnosticUtility.DebugAssert("RequestChannelBinder.RequestChannelBinder: (channel != null)");
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("channel");
}
this.channel = channel;
}
public IChannel Channel
{
get { return this.channel; }
}
public bool HasSession
{
get { return this.channel is ISessionChannel; }
}
public Uri ListenUri
{
get { return null; }
}
public EndpointAddress LocalAddress
{
get { return EndpointAddress.AnonymousAddress; }
}
public EndpointAddress RemoteAddress
{
get { return this.channel.RemoteAddress; }
}
public void Abort()
{
this.channel.Abort();
}
public void CloseAfterFault(TimeSpan timeout)
{
this.channel.Close(timeout);
}
public IAsyncResult BeginTryReceive(TimeSpan timeout, AsyncCallback callback, object state)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
}
public bool EndTryReceive(IAsyncResult result, out RequestContext requestContext)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
}
public IAsyncResult BeginSend(Message message, TimeSpan timeout, AsyncCallback callback, object state)
{
return this.channel.BeginRequest(message, timeout, callback, state);
}
public void EndSend(IAsyncResult result)
{
ValidateNullReply(this.channel.EndRequest(result));
}
public void Send(Message message, TimeSpan timeout)
{
ValidateNullReply(this.channel.Request(message, timeout));
}
public IAsyncResult BeginRequest(Message message, TimeSpan timeout, AsyncCallback callback, object state)
{
return this.channel.BeginRequest(message, timeout, callback, state);
}
public Message EndRequest(IAsyncResult result)
{
return this.channel.EndRequest(result);
}
public bool TryReceive(TimeSpan timeout, out RequestContext requestContext)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
}
public Message Request(Message message, TimeSpan timeout)
{
return this.channel.Request(message, timeout);
}
void ValidateNullReply(Message message)
{
if (message != null)
{
ProtocolException error = ProtocolException.OneWayOperationReturnedNonNull(message);
throw System.ServiceModel.Diagnostics.TraceUtility.ThrowHelperError(error, message);
}
}
public bool WaitForMessage(TimeSpan timeout)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
}
public IAsyncResult BeginWaitForMessage(TimeSpan timeout, AsyncCallback callback, object state)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
}
public bool EndWaitForMessage(IAsyncResult result)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ResourceExpressionBuilder.cs
- SqlRecordBuffer.cs
- FixedTextContainer.cs
- ZipPackage.cs
- CounterSet.cs
- InkCollectionBehavior.cs
- RuntimeHandles.cs
- DockPattern.cs
- DataSourceExpression.cs
- WindowsTitleBar.cs
- ToggleProviderWrapper.cs
- MembershipPasswordException.cs
- CapacityStreamGeometryContext.cs
- ManipulationDelta.cs
- CompilerErrorCollection.cs
- SystemInfo.cs
- MessageQueueConverter.cs
- CoTaskMemSafeHandle.cs
- InstanceDescriptor.cs
- SimpleWorkerRequest.cs
- XmlUtf8RawTextWriter.cs
- UIElement3D.cs
- HierarchicalDataSourceConverter.cs
- ObjectStateManager.cs
- HostedHttpContext.cs
- WindowsSecurityToken.cs
- UIElement.cs
- DrawToolTipEventArgs.cs
- Application.cs
- Parsers.cs
- StylusPlugin.cs
- TemplateBindingExtensionConverter.cs
- FormViewCommandEventArgs.cs
- MultitargetingHelpers.cs
- ListMarkerLine.cs
- ItemCheckedEvent.cs
- ExpandButtonVisibilityConverter.cs
- StaticTextPointer.cs
- PointUtil.cs
- BufferedStream.cs
- SiteOfOriginContainer.cs
- Translator.cs
- RuleSettings.cs
- SizeChangedInfo.cs
- OLEDB_Util.cs
- SwitchElementsCollection.cs
- FrameworkElementFactoryMarkupObject.cs
- SqlFileStream.cs
- HttpException.cs
- XamlFilter.cs
- UrlUtility.cs
- SystemException.cs
- Ops.cs
- DataGridViewControlCollection.cs
- Reference.cs
- IChannel.cs
- ConnectionPointCookie.cs
- SignedXml.cs
- OrderedEnumerableRowCollection.cs
- Claim.cs
- ImageMapEventArgs.cs
- cookie.cs
- DesignerActionItemCollection.cs
- XmlUrlResolver.cs
- SafeCertificateStore.cs
- WebPartDesigner.cs
- CodeDefaultValueExpression.cs
- ColorIndependentAnimationStorage.cs
- BuildDependencySet.cs
- FontWeights.cs
- HttpWebRequestElement.cs
- XPathDocumentBuilder.cs
- ConfigurationValidatorAttribute.cs
- KnownColorTable.cs
- FontCollection.cs
- SqlCachedBuffer.cs
- MouseCaptureWithinProperty.cs
- WebBrowserContainer.cs
- ApplicationFileCodeDomTreeGenerator.cs
- File.cs
- ButtonBase.cs
- QueryRewriter.cs
- CombinedGeometry.cs
- TdsParserStaticMethods.cs
- ClonableStack.cs
- CharStorage.cs
- controlskin.cs
- PrimitiveSchema.cs
- DataControlPagerLinkButton.cs
- XmlNamespaceMapping.cs
- AttributeSetAction.cs
- Listbox.cs
- Pair.cs
- XNodeNavigator.cs
- _NestedSingleAsyncResult.cs
- ValidationResult.cs
- XmlWrappingReader.cs
- PlatformCulture.cs
- AppDomainResourcePerfCounters.cs
- ConstructorNeedsTagAttribute.cs