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
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HelpKeywordAttribute.cs
- ProxyWebPartConnectionCollection.cs
- UdpMessageProperty.cs
- CompressEmulationStream.cs
- RequestValidator.cs
- SelectedGridItemChangedEvent.cs
- Type.cs
- LiteralLink.cs
- _DomainName.cs
- WinEventQueueItem.cs
- Subset.cs
- SiteMapDataSource.cs
- PropertyEmitterBase.cs
- CheckBoxList.cs
- WebPartTracker.cs
- ResolveMatches11.cs
- HttpCapabilitiesEvaluator.cs
- BoundPropertyEntry.cs
- XmlSchemaObjectCollection.cs
- RelOps.cs
- GridViewColumn.cs
- Registry.cs
- XamlPointCollectionSerializer.cs
- SrgsNameValueTag.cs
- GridViewAutomationPeer.cs
- TextAnchor.cs
- SafeNativeMethods.cs
- TaiwanLunisolarCalendar.cs
- QueryContinueDragEventArgs.cs
- ShutDownListener.cs
- XmlObjectSerializerReadContext.cs
- AutoGeneratedField.cs
- ReverseInheritProperty.cs
- XmlDataDocument.cs
- CalendarBlackoutDatesCollection.cs
- HttpPostLocalhostServerProtocol.cs
- WorkflowDesignerColors.cs
- XmlRootAttribute.cs
- SelectionListComponentEditor.cs
- _AuthenticationState.cs
- XPathSingletonIterator.cs
- XmlHelper.cs
- XmlSerializer.cs
- NameValueSectionHandler.cs
- BitmapCacheBrush.cs
- LayoutTable.cs
- HyperLinkField.cs
- Vertex.cs
- InputLangChangeRequestEvent.cs
- DBSqlParserColumn.cs
- SecurityProtocolFactory.cs
- WebPartConnectionCollection.cs
- propertytag.cs
- SmiRequestExecutor.cs
- ModelServiceImpl.cs
- _NativeSSPI.cs
- OutputScopeManager.cs
- RelatedView.cs
- ListMarkerSourceInfo.cs
- StyleModeStack.cs
- EncoderReplacementFallback.cs
- TransformationRules.cs
- WebPartTransformerAttribute.cs
- CryptoApi.cs
- SqlDataSourceCommandEventArgs.cs
- XmlSerializer.cs
- DataGridColumnCollection.cs
- DynamicDataExtensions.cs
- NetStream.cs
- XsdBuildProvider.cs
- IconBitmapDecoder.cs
- ListGeneralPage.cs
- ParameterElementCollection.cs
- Paragraph.cs
- AlternationConverter.cs
- KeyedQueue.cs
- ProviderBase.cs
- SqlProviderServices.cs
- EntitySqlQueryCacheKey.cs
- TextElementCollectionHelper.cs
- BooleanToVisibilityConverter.cs
- XmlSerializationGeneratedCode.cs
- IPPacketInformation.cs
- InvalidPropValue.cs
- HtmlTable.cs
- Emitter.cs
- UrlParameterWriter.cs
- Axis.cs
- CssClassPropertyAttribute.cs
- ResourceManagerWrapper.cs
- MergeFilterQuery.cs
- FileUpload.cs
- SHA512.cs
- httpapplicationstate.cs
- UDPClient.cs
- LayoutSettings.cs
- DataGridBoolColumn.cs
- EntityContainerEmitter.cs
- FunctionDescription.cs
- SamlNameIdentifierClaimResource.cs