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
- NamedPermissionSet.cs
- ErrorLog.cs
- GeometryHitTestParameters.cs
- CatalogPartCollection.cs
- CursorConverter.cs
- ListViewGroupConverter.cs
- ObjectConverter.cs
- SqlTransaction.cs
- TableCell.cs
- HttpProfileGroupBase.cs
- IPEndPoint.cs
- ListViewInsertedEventArgs.cs
- InputBuffer.cs
- IgnoreSection.cs
- SystemUnicastIPAddressInformation.cs
- KernelTypeValidation.cs
- QueryOperationResponseOfT.cs
- HierarchicalDataBoundControl.cs
- webclient.cs
- MissingSatelliteAssemblyException.cs
- ListViewSelectEventArgs.cs
- XPathDocumentBuilder.cs
- PackageRelationshipSelector.cs
- EmptyEnumerator.cs
- HttpAsyncResult.cs
- CustomSignedXml.cs
- IPipelineRuntime.cs
- AspNetSynchronizationContext.cs
- ModelItemKeyValuePair.cs
- DataColumnPropertyDescriptor.cs
- ProfileBuildProvider.cs
- Rules.cs
- ByteStorage.cs
- DBCommandBuilder.cs
- WizardForm.cs
- StoreConnection.cs
- SpecialNameAttribute.cs
- DEREncoding.cs
- JumpItem.cs
- ByteAnimation.cs
- InternalTransaction.cs
- RuntimeConfigLKG.cs
- Region.cs
- DispatchChannelSink.cs
- DataColumnCollection.cs
- StateFinalizationDesigner.cs
- DataRecordInternal.cs
- RC2CryptoServiceProvider.cs
- Switch.cs
- DetailsViewPageEventArgs.cs
- Trigger.cs
- templategroup.cs
- FlowDocument.cs
- XmlSerializerNamespaces.cs
- EngineSite.cs
- XmlWrappingReader.cs
- BuildProvider.cs
- PocoPropertyAccessorStrategy.cs
- M3DUtil.cs
- ProxySimple.cs
- XmlChildEnumerator.cs
- FrameworkElement.cs
- InlineUIContainer.cs
- VirtualPathProvider.cs
- ObjectAssociationEndMapping.cs
- PermissionToken.cs
- CurrencyWrapper.cs
- MailSettingsSection.cs
- ResourceAttributes.cs
- DataTableClearEvent.cs
- IdleTimeoutMonitor.cs
- Nodes.cs
- EntityTemplateFactory.cs
- EastAsianLunisolarCalendar.cs
- BrowserDefinitionCollection.cs
- MethodCallExpression.cs
- Application.cs
- WrapPanel.cs
- PointAnimationUsingKeyFrames.cs
- ChannelServices.cs
- TrackingServices.cs
- LastQueryOperator.cs
- DataGridCellItemAutomationPeer.cs
- DBPropSet.cs
- StorageSetMapping.cs
- DBDataPermissionAttribute.cs
- RegexParser.cs
- BuildProvider.cs
- SQLBytes.cs
- MouseEvent.cs
- EndpointDispatcherTable.cs
- ContentElement.cs
- PolyBezierSegment.cs
- ErrorHandler.cs
- AppDomainManager.cs
- RootBuilder.cs
- ActionFrame.cs
- CollectionViewGroup.cs
- SrgsDocument.cs
- EncoderParameter.cs