Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / TransactionBridge / Microsoft / Transactions / Wsat / Messaging / SupportingTokenDuplexChannel.cs / 1 / SupportingTokenDuplexChannel.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- // Defines the SupportingTokenChannel that implements IDuplexChannel using System; using System.ServiceModel; using System.ServiceModel.Channels; using System.ServiceModel.Security; using Microsoft.Transactions.Wsat.Protocol; namespace Microsoft.Transactions.Wsat.Messaging { class SupportingTokenDuplexChannel : SupportingTokenChannel, IDuplexChannel { public SupportingTokenDuplexChannel(ChannelManagerBase manager, IDuplexChannel innerChannel, SupportingTokenSecurityTokenResolver tokenResolver, ProtocolVersion protocolVersion) : base(manager, innerChannel, tokenResolver, protocolVersion) { } public EndpointAddress LocalAddress { get { return this.innerChannel.LocalAddress; } } public EndpointAddress RemoteAddress { get { return this.innerChannel.RemoteAddress; } } public Uri Via { get { return this.innerChannel.Via; } } public Message Receive() { Message message = this.innerChannel.Receive(); OnReceive(message); return message; } public Message Receive(TimeSpan timeout) { Message message = this.innerChannel.Receive(timeout); OnReceive(message); return message; } public IAsyncResult BeginReceive(AsyncCallback callback, object state) { return this.innerChannel.BeginReceive(callback, state); } public IAsyncResult BeginReceive(TimeSpan timeout, AsyncCallback callback, object state) { return this.innerChannel.BeginReceive(timeout, callback, state); } public Message EndReceive(IAsyncResult result) { Message message = this.innerChannel.EndReceive(result); OnReceive(message); return message; } public bool TryReceive(TimeSpan timeout, out Message message) { if (this.innerChannel.TryReceive(timeout, out message)) { OnReceive(message); return true; } else { return false; } } public IAsyncResult BeginTryReceive(TimeSpan timeout, AsyncCallback callback, object state) { return this.innerChannel.BeginTryReceive(timeout, callback, state); } public bool EndTryReceive(IAsyncResult result, out Message message) { if (this.innerChannel.EndTryReceive(result, out message)) { OnReceive(message); return true; } else { return false; } } public IAsyncResult BeginSend(Message message, AsyncCallback callback, object state) { return this.BeginSend(message, this.DefaultSendTimeout, callback, state); } public IAsyncResult BeginSend(Message message, TimeSpan timeout, AsyncCallback asyncCallback, object state) { return this.innerChannel.BeginSend(message, timeout, asyncCallback, state); } public void EndSend(IAsyncResult result) { this.innerChannel.EndSend(result); } public void Send(Message message) { this.innerChannel.Send(message); } public void Send(Message message, TimeSpan timeout) { this.innerChannel.Send(message, timeout); } public bool WaitForMessage(TimeSpan timeout) { return this.innerChannel.WaitForMessage(timeout); } public IAsyncResult BeginWaitForMessage(TimeSpan timeout, AsyncCallback callback, object state) { return this.innerChannel.BeginWaitForMessage(timeout, callback, state); } public bool EndWaitForMessage(IAsyncResult result) { return this.innerChannel.EndWaitForMessage(result); } protected override void TrySendFaultReply(Message faultMessage) { this.innerChannel.Send(faultMessage); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MemberRelationshipService.cs
- _ListenerAsyncResult.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- ResXDataNode.cs
- SystemIPInterfaceStatistics.cs
- SigningProgress.cs
- Matrix.cs
- RuntimeConfig.cs
- CodeParameterDeclarationExpressionCollection.cs
- SharedConnectionListener.cs
- Timer.cs
- XmlSchemaSet.cs
- EnterpriseServicesHelper.cs
- ModuleConfigurationInfo.cs
- HandleRef.cs
- ResolveNameEventArgs.cs
- XPathNavigatorReader.cs
- DockPattern.cs
- GenericAuthenticationEventArgs.cs
- IDictionary.cs
- PriorityBindingExpression.cs
- RightsManagementEncryptionTransform.cs
- RoleService.cs
- MouseDevice.cs
- VectorCollection.cs
- XmlSchemaSubstitutionGroup.cs
- DbgCompiler.cs
- LinkConverter.cs
- OperationResponse.cs
- XmlArrayItemAttribute.cs
- DataTableMappingCollection.cs
- BamlResourceSerializer.cs
- EventLogPermissionEntry.cs
- TailCallAnalyzer.cs
- EntityReference.cs
- basemetadatamappingvisitor.cs
- InProcStateClientManager.cs
- XamlToRtfWriter.cs
- SqlSupersetValidator.cs
- StaticSiteMapProvider.cs
- CfgParser.cs
- CacheSection.cs
- OutputCacheProfileCollection.cs
- RotateTransform.cs
- RichTextBoxDesigner.cs
- BitmapMetadataBlob.cs
- XmlUrlResolver.cs
- DockProviderWrapper.cs
- LinkClickEvent.cs
- BindingsCollection.cs
- ImmutableAssemblyCacheEntry.cs
- StrongNamePublicKeyBlob.cs
- HtmlTableRow.cs
- AmbientProperties.cs
- ArgumentNullException.cs
- ComboBox.cs
- TemplateEditingFrame.cs
- RemotingSurrogateSelector.cs
- WmfPlaceableFileHeader.cs
- ConvertEvent.cs
- RectangleF.cs
- FormViewPagerRow.cs
- CodeSubDirectoriesCollection.cs
- TypeCollectionPropertyEditor.cs
- SerializationAttributes.cs
- HandlerBase.cs
- ContextMenuStrip.cs
- Closure.cs
- EncodingInfo.cs
- EditBehavior.cs
- UniqueConstraint.cs
- TabControl.cs
- BaseCodePageEncoding.cs
- PathParser.cs
- TransactionManager.cs
- ListControl.cs
- FixedSOMTableRow.cs
- CookielessData.cs
- AuthenticationException.cs
- RTLAwareMessageBox.cs
- WebPartDescription.cs
- EncryptedKey.cs
- SR.cs
- NameValuePermission.cs
- ConstraintManager.cs
- ListViewDeletedEventArgs.cs
- MouseGestureConverter.cs
- DataStreamFromComStream.cs
- CheckBoxBaseAdapter.cs
- ActivityUtilities.cs
- DockAndAnchorLayout.cs
- Automation.cs
- ResizeGrip.cs
- RegexBoyerMoore.cs
- InternalPermissions.cs
- ButtonBaseAutomationPeer.cs
- UDPClient.cs
- SelectionPatternIdentifiers.cs
- BitmapDecoder.cs
- BitmapEncoder.cs