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
- TextEditorThreadLocalStore.cs
- Encoder.cs
- QualifiedCellIdBoolean.cs
- SqlFunctions.cs
- FixedSOMContainer.cs
- SimpleFileLog.cs
- IpcClientManager.cs
- HideDisabledControlAdapter.cs
- ScrollChrome.cs
- PrivilegedConfigurationManager.cs
- ResourcePermissionBaseEntry.cs
- HotSpotCollectionEditor.cs
- PackWebRequestFactory.cs
- UnsignedPublishLicense.cs
- DescendantBaseQuery.cs
- XamlBrushSerializer.cs
- ToolbarAUtomationPeer.cs
- RoutedEventConverter.cs
- ProcessHost.cs
- FtpRequestCacheValidator.cs
- PrinterSettings.cs
- ActiveDesignSurfaceEvent.cs
- LocalizationComments.cs
- InternalCache.cs
- WindowsFormsHostAutomationPeer.cs
- HttpValueCollection.cs
- LayoutDump.cs
- MarkupExtensionSerializer.cs
- ProjectionAnalyzer.cs
- TableAdapterManagerNameHandler.cs
- _NetworkingPerfCounters.cs
- Trace.cs
- VirtualPathUtility.cs
- MessageAction.cs
- CompModSwitches.cs
- Aggregates.cs
- XmlDeclaration.cs
- CollectionsUtil.cs
- DataTableMappingCollection.cs
- ParserContext.cs
- DataViewListener.cs
- ReferencedAssembly.cs
- ToolStripStatusLabel.cs
- RegexReplacement.cs
- AuthenticationSection.cs
- HttpRuntime.cs
- DbConnectionInternal.cs
- ManagementNamedValueCollection.cs
- XmlBinaryReader.cs
- ECDiffieHellmanCngPublicKey.cs
- TextCompositionManager.cs
- SchemaTypeEmitter.cs
- MenuItem.cs
- ProviderCollection.cs
- UnionCodeGroup.cs
- TypedTableGenerator.cs
- TraceContextEventArgs.cs
- LinkedList.cs
- TreeViewCancelEvent.cs
- CustomAttributeFormatException.cs
- FixedSOMElement.cs
- ObjectTag.cs
- ConfigXmlCDataSection.cs
- RelatedImageListAttribute.cs
- PassportAuthentication.cs
- Animatable.cs
- TextParagraphCache.cs
- JulianCalendar.cs
- Style.cs
- StringInfo.cs
- PlatformNotSupportedException.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- filewebresponse.cs
- ToolStripItemRenderEventArgs.cs
- Column.cs
- ProviderIncompatibleException.cs
- Base64Encoder.cs
- UnsafeMethods.cs
- EncodingNLS.cs
- WindowCollection.cs
- ExtendedPropertyCollection.cs
- HitTestFilterBehavior.cs
- EntityClientCacheEntry.cs
- DataKey.cs
- ThemeDirectoryCompiler.cs
- ListViewItem.cs
- ColorConverter.cs
- WrapPanel.cs
- RolePrincipal.cs
- HwndHost.cs
- PolyLineSegmentFigureLogic.cs
- Connector.cs
- SplitterPanel.cs
- ElementMarkupObject.cs
- DataGridViewHeaderCell.cs
- Command.cs
- COM2PictureConverter.cs
- ServiceOperationListItemList.cs
- CaseInsensitiveComparer.cs
- PathFigureCollection.cs