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
- DesignerListAdapter.cs
- WindowsServiceElement.cs
- Invariant.cs
- PeerName.cs
- KeyPullup.cs
- TextTreeTextBlock.cs
- PageEventArgs.cs
- SettingsProviderCollection.cs
- PolicyChain.cs
- TdsParserStaticMethods.cs
- QilReplaceVisitor.cs
- RegionInfo.cs
- BitmapEffectGroup.cs
- XmlSchemaNotation.cs
- JournalEntryListConverter.cs
- PlainXmlDeserializer.cs
- PackWebRequestFactory.cs
- SortQuery.cs
- CancellationToken.cs
- PackWebRequest.cs
- Matrix3DStack.cs
- RepeatButtonAutomationPeer.cs
- MetadataHelper.cs
- HttpPostLocalhostServerProtocol.cs
- ByteAnimationBase.cs
- SerializerProvider.cs
- ErrorStyle.cs
- Oid.cs
- CompiledXpathExpr.cs
- CustomExpressionEventArgs.cs
- Lasso.cs
- MetaModel.cs
- Logging.cs
- List.cs
- StandardCommandToolStripMenuItem.cs
- ToolBar.cs
- BamlResourceDeserializer.cs
- ChannelPool.cs
- ResourceExpression.cs
- PictureBoxDesigner.cs
- ViewStateChangedEventArgs.cs
- GlobalizationSection.cs
- CompleteWizardStep.cs
- FormsAuthenticationModule.cs
- ActionFrame.cs
- SafeRightsManagementSessionHandle.cs
- AutomationPatternInfo.cs
- CurrencyManager.cs
- ConstructorNeedsTagAttribute.cs
- SynchronizedInputPattern.cs
- WorkflowInstanceAbortedRecord.cs
- FileReader.cs
- ValueSerializer.cs
- ClientSettingsSection.cs
- SymbolPair.cs
- RadioButton.cs
- MonthChangedEventArgs.cs
- AssemblyBuilderData.cs
- SelectionListComponentEditor.cs
- OracleFactory.cs
- UiaCoreApi.cs
- SafeFileMappingHandle.cs
- PropertyGeneratedEventArgs.cs
- DrawingState.cs
- GeneratedCodeAttribute.cs
- DataSourceControlBuilder.cs
- DataBindingValueUIHandler.cs
- XPathPatternBuilder.cs
- wmiprovider.cs
- SafeFileMapViewHandle.cs
- GroupItem.cs
- ProxyWebPartConnectionCollection.cs
- Process.cs
- Msec.cs
- SemanticBasicElement.cs
- BlurEffect.cs
- TwoPhaseCommit.cs
- ColumnClickEvent.cs
- DataGridViewImageCell.cs
- configsystem.cs
- AssemblyName.cs
- OperationContextScope.cs
- CompilationRelaxations.cs
- BooleanStorage.cs
- Boolean.cs
- Console.cs
- CodeAccessPermission.cs
- EntryIndex.cs
- RunInstallerAttribute.cs
- DataListItemCollection.cs
- CodeExporter.cs
- DetailsViewInsertEventArgs.cs
- DataGridViewColumnConverter.cs
- DataGridViewRowCollection.cs
- ChtmlCalendarAdapter.cs
- OutputScopeManager.cs
- SoapElementAttribute.cs
- Int32Converter.cs
- IPCCacheManager.cs
- ObjectDataSourceDisposingEventArgs.cs