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
- SafeArrayRankMismatchException.cs
- cryptoapiTransform.cs
- CodeVariableDeclarationStatement.cs
- Clock.cs
- CustomError.cs
- ChangeDirector.cs
- TemplatedWizardStep.cs
- PartialToken.cs
- LongAverageAggregationOperator.cs
- ResXBuildProvider.cs
- DataSetSchema.cs
- SystemMulticastIPAddressInformation.cs
- HttpCachePolicy.cs
- TextViewBase.cs
- ModelItemDictionary.cs
- Token.cs
- Int32Collection.cs
- SoapFault.cs
- AncillaryOps.cs
- XPathCompileException.cs
- FullTrustAssembly.cs
- VisualTransition.cs
- DataGridParentRows.cs
- WindowsToolbarAsMenu.cs
- ShaderRenderModeValidation.cs
- Help.cs
- CustomError.cs
- FixedNode.cs
- coordinator.cs
- DataControlLinkButton.cs
- SecurityMode.cs
- EntityCommandCompilationException.cs
- NumberFunctions.cs
- ReferenceConverter.cs
- ChildTable.cs
- MemberDomainMap.cs
- SqlConnection.cs
- UnconditionalPolicy.cs
- WindowsTitleBar.cs
- LoopExpression.cs
- LogAppendAsyncResult.cs
- HyperlinkAutomationPeer.cs
- SessionEndingEventArgs.cs
- Pair.cs
- TimelineCollection.cs
- DefaultSettingsSection.cs
- SqlProcedureAttribute.cs
- TagElement.cs
- PointConverter.cs
- QueryAccessibilityHelpEvent.cs
- TypedDatasetGenerator.cs
- DecoderFallback.cs
- FormView.cs
- WebPartUtil.cs
- DrawingContextDrawingContextWalker.cs
- NamespaceCollection.cs
- Substitution.cs
- MenuItemBindingCollection.cs
- GetReadStreamResult.cs
- SoapSchemaImporter.cs
- InputManager.cs
- DrawingContext.cs
- FixedFlowMap.cs
- AdCreatedEventArgs.cs
- UnsafeNativeMethods.cs
- ExtenderControl.cs
- InstanceDescriptor.cs
- iisPickupDirectory.cs
- ControlIdConverter.cs
- DesignerOptionService.cs
- TextFindEngine.cs
- Vector3DAnimationBase.cs
- PriorityBindingExpression.cs
- UiaCoreProviderApi.cs
- ToolStripDropDownClosingEventArgs.cs
- LinearGradientBrush.cs
- TabPage.cs
- Input.cs
- QualifiedCellIdBoolean.cs
- TabControlCancelEvent.cs
- ResourceBinder.cs
- TextTrailingWordEllipsis.cs
- PermissionSetEnumerator.cs
- InheritanceAttribute.cs
- SeekStoryboard.cs
- SimpleHandlerFactory.cs
- CustomValidator.cs
- ScriptingJsonSerializationSection.cs
- LineServicesCallbacks.cs
- TabControl.cs
- TypefaceMetricsCache.cs
- FileEnumerator.cs
- Tablet.cs
- DispatcherExceptionEventArgs.cs
- RenderTargetBitmap.cs
- XmlDocumentSerializer.cs
- _NegoState.cs
- HttpApplicationStateBase.cs
- KeyTimeConverter.cs
- SqlLiftIndependentRowExpressions.cs