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
- CompositeScriptReference.cs
- DocumentationServerProtocol.cs
- Deserializer.cs
- DbMetaDataFactory.cs
- DataPagerFieldItem.cs
- BindingListCollectionView.cs
- IResourceProvider.cs
- RsaSecurityKey.cs
- ChineseLunisolarCalendar.cs
- DeviceSpecificChoiceCollection.cs
- EventProviderClassic.cs
- Internal.cs
- Invariant.cs
- WebGetAttribute.cs
- AlternationConverter.cs
- XmlIgnoreAttribute.cs
- RTTypeWrapper.cs
- TableItemStyle.cs
- EarlyBoundInfo.cs
- SessionPageStatePersister.cs
- Converter.cs
- Delegate.cs
- ITreeGenerator.cs
- ClientSettingsStore.cs
- NameNode.cs
- ImageAutomationPeer.cs
- ListSourceHelper.cs
- FileSecurity.cs
- SecondaryIndexList.cs
- WmlValidatorAdapter.cs
- AccessDataSourceDesigner.cs
- ToolboxComponentsCreatingEventArgs.cs
- objectquery_tresulttype.cs
- ZeroOpNode.cs
- DateTimePicker.cs
- RadioButtonStandardAdapter.cs
- DecimalAnimationBase.cs
- PeerObject.cs
- CompilationUtil.cs
- IntSecurity.cs
- FontStretches.cs
- ListParagraph.cs
- ReflectionPermission.cs
- Light.cs
- HashHelpers.cs
- XmlSchemaImporter.cs
- RegisteredDisposeScript.cs
- ParseChildrenAsPropertiesAttribute.cs
- XmlSchemaValidator.cs
- XPathAncestorQuery.cs
- StoreItemCollection.cs
- remotingproxy.cs
- ToolStripControlHost.cs
- XamlClipboardData.cs
- NonVisualControlAttribute.cs
- AssociationTypeEmitter.cs
- RichTextBoxContextMenu.cs
- SpnEndpointIdentityExtension.cs
- DataTemplateSelector.cs
- MatrixConverter.cs
- NGCSerializer.cs
- DesignerActionGlyph.cs
- SafeNativeMethods.cs
- AccessKeyManager.cs
- DataRecordInfo.cs
- MouseGestureValueSerializer.cs
- ToolStripSplitStackLayout.cs
- PropertyMetadata.cs
- ScaleTransform3D.cs
- BooleanSwitch.cs
- CharacterBufferReference.cs
- WebSysDescriptionAttribute.cs
- MetadataCacheItem.cs
- ListItemsCollectionEditor.cs
- AudioFormatConverter.cs
- _ChunkParse.cs
- WeakRefEnumerator.cs
- webeventbuffer.cs
- LineServicesCallbacks.cs
- SchemaElementLookUpTable.cs
- MediaSystem.cs
- ConnectionPoint.cs
- HttpListenerResponse.cs
- Configuration.cs
- DataViewManagerListItemTypeDescriptor.cs
- EnumValAlphaComparer.cs
- AuthenticationException.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- EncoderFallback.cs
- XmlEncoding.cs
- GeneralTransform3DGroup.cs
- XmlQueryTypeFactory.cs
- UpdateProgress.cs
- UdpDiscoveryEndpoint.cs
- GridViewDeleteEventArgs.cs
- CLSCompliantAttribute.cs
- NestPullup.cs
- InputBuffer.cs
- TabItemAutomationPeer.cs
- AttachmentCollection.cs