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
- CalendarKeyboardHelper.cs
- datacache.cs
- EventLogEntry.cs
- UpDownBase.cs
- ProfileGroupSettingsCollection.cs
- ToolStripDropDownClosedEventArgs.cs
- SystemIPGlobalStatistics.cs
- IdleTimeoutMonitor.cs
- UpdateExpressionVisitor.cs
- OneOfScalarConst.cs
- _UncName.cs
- CommonGetThemePartSize.cs
- ObfuscationAttribute.cs
- Point.cs
- MetadataCache.cs
- PreloadedPackages.cs
- XPathAxisIterator.cs
- DataChangedEventManager.cs
- EntityClassGenerator.cs
- FileDialogCustomPlace.cs
- ServiceContractViewControl.cs
- ApplicationFileParser.cs
- StylusOverProperty.cs
- TreeBuilderBamlTranslator.cs
- CustomErrorsSection.cs
- Property.cs
- DoubleAnimationUsingKeyFrames.cs
- XmlIncludeAttribute.cs
- CompositeTypefaceMetrics.cs
- XmlSerializerAssemblyAttribute.cs
- OneOfScalarConst.cs
- CodeExpressionRuleDeclaration.cs
- _TimerThread.cs
- ProxyWebPartManager.cs
- TableHeaderCell.cs
- AesCryptoServiceProvider.cs
- HMACSHA384.cs
- InkCanvasFeedbackAdorner.cs
- ExpressionsCollectionConverter.cs
- RuntimeCompatibilityAttribute.cs
- LogicalExpressionEditor.cs
- SignerInfo.cs
- SqlDuplicator.cs
- WindowsGraphics2.cs
- HtmlGenericControl.cs
- precedingsibling.cs
- DataSourceView.cs
- PartitionerQueryOperator.cs
- DataGridViewRowPrePaintEventArgs.cs
- GlyphRun.cs
- FileUtil.cs
- ResourceExpression.cs
- FileRecordSequenceCompletedAsyncResult.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- MultiViewDesigner.cs
- ProcessHostConfigUtils.cs
- XamlToRtfWriter.cs
- ObsoleteAttribute.cs
- XmlHierarchyData.cs
- Error.cs
- UnsafeNativeMethods.cs
- RootProfilePropertySettingsCollection.cs
- EventlogProvider.cs
- HiddenFieldPageStatePersister.cs
- ItemDragEvent.cs
- GraphicsContainer.cs
- SqlFunctionAttribute.cs
- XmlAutoDetectWriter.cs
- MessageSecurityOverMsmqElement.cs
- Html32TextWriter.cs
- RuntimeConfigurationRecord.cs
- OdbcConnectionHandle.cs
- ListViewInsertEventArgs.cs
- SamlAuthorizationDecisionStatement.cs
- StaticTextPointer.cs
- HashHelpers.cs
- IItemProperties.cs
- ZipIOCentralDirectoryBlock.cs
- SettingsPropertyValue.cs
- TdsParserSafeHandles.cs
- EntityTemplateUserControl.cs
- ObjectDataSourceSelectingEventArgs.cs
- TransformGroup.cs
- NativeMethods.cs
- ExtensionQuery.cs
- EventLogger.cs
- TypographyProperties.cs
- WindowsFormsLinkLabel.cs
- ImmutableCollection.cs
- XsdDataContractExporter.cs
- ConnectionConsumerAttribute.cs
- NotificationContext.cs
- externdll.cs
- UnSafeCharBuffer.cs
- GenericTextProperties.cs
- WorkflowViewStateService.cs
- ExceptQueryOperator.cs
- shaper.cs
- AttachmentService.cs
- EncoderBestFitFallback.cs