Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / tx / System / Transactions / Oletx / OletxDependentTransaction.cs / 1305376 / OletxDependentTransaction.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.Diagnostics; using System.Threading; using System.Transactions.Diagnostics; namespace System.Transactions.Oletx { [Serializable] internal class OletxDependentTransaction : OletxTransaction { private OletxVolatileEnlistmentContainer volatileEnlistmentContainer; private int completed = 0; internal OletxDependentTransaction( RealOletxTransaction realTransaction, bool delayCommit ) : base( realTransaction ) { if ( null == realTransaction ) { throw new ArgumentNullException( "realTransaction" ); } this.volatileEnlistmentContainer = realOletxTransaction.AddDependentClone( delayCommit ); if ( DiagnosticTrace.Information ) { DependentCloneCreatedTraceRecord.Trace( SR.GetString( SR.TraceSourceOletx ), this.TransactionTraceId, delayCommit ? DependentCloneOption.BlockCommitUntilComplete : DependentCloneOption.RollbackIfNotComplete ); } } public void Complete() { if ( DiagnosticTrace.Verbose ) { MethodEnteredTraceRecord.Trace( SR.GetString( SR.TraceSourceOletx ), "DependentTransaction.Complete" ); } Debug.Assert( ( 0 == this.disposed ), "OletxTransction object is disposed" ); int localCompleted = Interlocked.CompareExchange( ref this.completed, 1, 0 ); if ( 1 == localCompleted ) { throw TransactionException.CreateTransactionCompletedException( SR.GetString( SR.TraceSourceOletx ) ); } if ( DiagnosticTrace.Information ) { DependentCloneCompleteTraceRecord.Trace( SR.GetString( SR.TraceSourceOletx ), this.TransactionTraceId ); } this.volatileEnlistmentContainer.DependentCloneCompleted(); if ( DiagnosticTrace.Verbose ) { MethodExitedTraceRecord.Trace( SR.GetString( SR.TraceSourceOletx ), "DependentTransaction.Complete" ); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- StopRoutingHandler.cs
- FormParameter.cs
- XpsFilter.cs
- PeerNameRecord.cs
- NewItemsContextMenuStrip.cs
- ToolStripItemTextRenderEventArgs.cs
- DesignerAdapterUtil.cs
- BinaryUtilClasses.cs
- SessionStateSection.cs
- ErrorHandlerFaultInfo.cs
- FontInfo.cs
- CollectionDataContract.cs
- EventArgs.cs
- SystemFonts.cs
- PopOutPanel.cs
- InvalidOperationException.cs
- DbProviderSpecificTypePropertyAttribute.cs
- XmlSchemaSimpleContent.cs
- ToolTipAutomationPeer.cs
- WindowsRegion.cs
- XmlText.cs
- RadialGradientBrush.cs
- PingOptions.cs
- BindingNavigator.cs
- RelatedEnd.cs
- DataGridViewBand.cs
- DataGridViewCellValueEventArgs.cs
- PeerUnsafeNativeCryptMethods.cs
- ServiceMemoryGates.cs
- _AuthenticationState.cs
- GridViewRowCollection.cs
- Int64.cs
- FormViewCommandEventArgs.cs
- WindowsBrush.cs
- LinqDataSourceValidationException.cs
- x509store.cs
- HttpHandlerAction.cs
- CmsInterop.cs
- DataStreamFromComStream.cs
- Expander.cs
- MutableAssemblyCacheEntry.cs
- SoapHeaders.cs
- BrushMappingModeValidation.cs
- ComponentChangedEvent.cs
- AsymmetricSignatureFormatter.cs
- ParseElement.cs
- BmpBitmapDecoder.cs
- WindowsFormsHostPropertyMap.cs
- SiteMapPath.cs
- httpapplicationstate.cs
- NumericUpDownAcceleration.cs
- ArgumentValidation.cs
- WindowsClientCredential.cs
- WinEventHandler.cs
- MgmtResManager.cs
- TableLayoutPanelCellPosition.cs
- DataContractSerializer.cs
- AVElementHelper.cs
- ObjectFullSpanRewriter.cs
- MoveSizeWinEventHandler.cs
- GenericEnumerator.cs
- UnionCqlBlock.cs
- FullTextState.cs
- SystemIPAddressInformation.cs
- BoundColumn.cs
- TypedReference.cs
- HwndSubclass.cs
- QueryContinueDragEvent.cs
- SiteMapDataSource.cs
- Int64KeyFrameCollection.cs
- TCPClient.cs
- RawStylusInputCustomData.cs
- FunctionQuery.cs
- ScaleTransform3D.cs
- CollectionViewGroup.cs
- Cell.cs
- ConfigXmlElement.cs
- _ScatterGatherBuffers.cs
- ToolBar.cs
- Axis.cs
- SettingsBase.cs
- ObjectConverter.cs
- ExtensionElement.cs
- ConstantExpression.cs
- Double.cs
- XmlUtil.cs
- Base64Decoder.cs
- RegexStringValidator.cs
- DispatcherFrame.cs
- MouseActionConverter.cs
- Italic.cs
- IResourceProvider.cs
- QuinticEase.cs
- WindowsListViewGroup.cs
- Helpers.cs
- LoginView.cs
- XmlSchemaSequence.cs
- GeneralTransform3D.cs
- StateManagedCollection.cs
- ClipboardProcessor.cs