Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / Msmq4SubqueuePoisonHandler.cs / 1 / Msmq4SubqueuePoisonHandler.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Channels { using System.Collections.Generic; using System.IO; using System.Threading; using System.Transactions; sealed class Msmq4SubqueuePoisonHandler : IPoisonHandlingStrategy { MsmqReceiveHelper receiver; public Msmq4SubqueuePoisonHandler(MsmqReceiveHelper receiver) { this.receiver = receiver; } public void Open() {} public bool CheckAndHandlePoisonMessage(MsmqMessageProperty messageProperty) { if (messageProperty.AbortCount > this.receiver.MsmqReceiveParameters.ReceiveRetryCount) { FinalDisposition(messageProperty); return true; } else { return false; } } public void FinalDisposition(MsmqMessageProperty messageProperty) { switch (this.receiver.MsmqReceiveParameters.ReceiveErrorHandling) { case ReceiveErrorHandling.Drop: this.receiver.DropOrRejectReceivedMessage(messageProperty, false); break; case ReceiveErrorHandling.Fault: MsmqReceiveHelper.TryAbortTransactionCurrent(); if (null != this.receiver.ChannelListener) this.receiver.ChannelListener.FaultListener(); if (null != this.receiver.Channel) this.receiver.Channel.FaultChannel(); break; case ReceiveErrorHandling.Reject: this.receiver.DropOrRejectReceivedMessage(messageProperty, true); MsmqDiagnostics.PoisonMessageRejected(messageProperty.MessageId, this.receiver.InstanceId); break; default: DiagnosticUtility.DebugAssert("System.ServiceModel.Channels.Msmq4PoisonHandler.FinalDisposition(): (unexpected ReceiveErrorHandling)"); break; } } public void Dispose() {} } } // 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
- SmtpClient.cs
- ArraySegment.cs
- ReferentialConstraint.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- XmlNodeReader.cs
- PrePrepareMethodAttribute.cs
- EntityWithKeyStrategy.cs
- ZipIORawDataFileBlock.cs
- FontUnitConverter.cs
- TypeDescriptionProvider.cs
- Int32Storage.cs
- ToolStripItem.cs
- ForceCopyBuildProvider.cs
- Invariant.cs
- BooleanConverter.cs
- DateTimeValueSerializer.cs
- MouseButton.cs
- BitmapEffect.cs
- AccessedThroughPropertyAttribute.cs
- InvalidComObjectException.cs
- OdbcStatementHandle.cs
- _Semaphore.cs
- DbMetaDataFactory.cs
- LinkLabel.cs
- KeyToListMap.cs
- Util.cs
- HtmlTextArea.cs
- HttpWebRequest.cs
- ErrorsHelper.cs
- SelectionItemPattern.cs
- ThreadExceptionEvent.cs
- ParserOptions.cs
- BidirectionalDictionary.cs
- DataObjectCopyingEventArgs.cs
- TabletCollection.cs
- InfoCardService.cs
- sqlser.cs
- ValidatorUtils.cs
- UniqueEventHelper.cs
- ManipulationLogic.cs
- DateBoldEvent.cs
- LockCookie.cs
- DbTypeMap.cs
- EnumType.cs
- XamlTemplateSerializer.cs
- PropertyBuilder.cs
- IItemContainerGenerator.cs
- FolderLevelBuildProviderCollection.cs
- Events.cs
- TypeConverterAttribute.cs
- TimeZoneNotFoundException.cs
- BaseTemplateParser.cs
- ExceptionHandlerDesigner.cs
- HttpHeaderCollection.cs
- BufferedOutputStream.cs
- ProxyWebPartManager.cs
- TreeNode.cs
- DataGridTextBox.cs
- PhysicalFontFamily.cs
- BitStack.cs
- WebPartUserCapability.cs
- OutOfMemoryException.cs
- EditableLabelControl.cs
- precedingquery.cs
- WebPartTransformerAttribute.cs
- AssemblyInfo.cs
- HyperLinkStyle.cs
- ClientSettingsProvider.cs
- ProtocolsConfigurationHandler.cs
- StringComparer.cs
- XmlSchemaSearchPattern.cs
- BooleanConverter.cs
- SessionParameter.cs
- CodeCommentStatement.cs
- Dump.cs
- ZipIOLocalFileDataDescriptor.cs
- RijndaelManagedTransform.cs
- HttpDebugHandler.cs
- ImpersonateTokenRef.cs
- SHA512Managed.cs
- FieldMetadata.cs
- Light.cs
- SelectorItemAutomationPeer.cs
- BinHexEncoder.cs
- StringFunctions.cs
- SqlAggregateChecker.cs
- PrintDocument.cs
- Collection.cs
- RemotingHelper.cs
- RectKeyFrameCollection.cs
- Utility.cs
- SoapEnumAttribute.cs
- ServiceNameCollection.cs
- PresentationAppDomainManager.cs
- AttachedPropertyBrowsableAttribute.cs
- Calendar.cs
- COSERVERINFO.cs
- QilBinary.cs
- QueryStoreStatusRequest.cs
- FontStyle.cs