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
- LinkLabel.cs
- Reference.cs
- Matrix3D.cs
- PropertyRecord.cs
- InvalidEnumArgumentException.cs
- IdentityHolder.cs
- SpeechDetectedEventArgs.cs
- HttpStreamMessageEncoderFactory.cs
- FileNameEditor.cs
- AtomServiceDocumentSerializer.cs
- BaseServiceProvider.cs
- Margins.cs
- SessionStateUtil.cs
- ProfileInfo.cs
- SchemaImporter.cs
- StyleTypedPropertyAttribute.cs
- DataTableReaderListener.cs
- TabControlEvent.cs
- ObjectDataSource.cs
- HttpRuntime.cs
- KnownTypes.cs
- ErrorReporting.cs
- GradientBrush.cs
- SafeTimerHandle.cs
- SqlTypeConverter.cs
- RunWorkerCompletedEventArgs.cs
- MailHeaderInfo.cs
- _AutoWebProxyScriptHelper.cs
- SecurityContext.cs
- SQLDecimal.cs
- CompilationLock.cs
- CachedBitmap.cs
- control.ime.cs
- OleDbRowUpdatedEvent.cs
- Mapping.cs
- NetMsmqSecurity.cs
- OdbcErrorCollection.cs
- DesigntimeLicenseContextSerializer.cs
- TreeViewCancelEvent.cs
- DictionarySectionHandler.cs
- PropertyChangedEventArgs.cs
- IconHelper.cs
- mediapermission.cs
- VectorAnimationBase.cs
- GAC.cs
- StrokeNodeOperations2.cs
- OperatingSystem.cs
- DrawingCollection.cs
- IndexedGlyphRun.cs
- WebBrowserNavigatingEventHandler.cs
- ControlBindingsCollection.cs
- SchemaTypeEmitter.cs
- Event.cs
- TableCell.cs
- ManagementObjectSearcher.cs
- UInt64.cs
- OracleBinary.cs
- PagerStyle.cs
- TextServicesProperty.cs
- ImageKeyConverter.cs
- PagesChangedEventArgs.cs
- DiffuseMaterial.cs
- StackSpiller.Bindings.cs
- XamlTemplateSerializer.cs
- DbConnectionClosed.cs
- ThreadAttributes.cs
- DataGridViewCellLinkedList.cs
- AliasExpr.cs
- SQLBoolean.cs
- XamlFrame.cs
- DrawItemEvent.cs
- Command.cs
- WebPartMenuStyle.cs
- XmlSchemaComplexType.cs
- ListDictionaryInternal.cs
- DbParameterCollectionHelper.cs
- PropertyValueUIItem.cs
- CodeDelegateCreateExpression.cs
- ValueUnavailableException.cs
- HtmlButton.cs
- SqlRemoveConstantOrderBy.cs
- MethodImplAttribute.cs
- GradientStop.cs
- GacUtil.cs
- HttpModuleCollection.cs
- XPathNode.cs
- UidPropertyAttribute.cs
- ColumnMapProcessor.cs
- WebReferencesBuildProvider.cs
- SectionRecord.cs
- ValidationEventArgs.cs
- Attributes.cs
- GroupDescription.cs
- TypeExtensionConverter.cs
- ApplicationFileParser.cs
- ProcessHostServerConfig.cs
- SQLBinaryStorage.cs
- DataExpression.cs
- MappingMetadataHelper.cs
- BackgroundFormatInfo.cs