Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / tx / System / Transactions / DependentTransaction.cs / 1305376 / DependentTransaction.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Transactions { using System; using System.Runtime.Serialization; using System.Transactions.Diagnostics; ///// When we serialize a DependentTransaction, we specify the type OletxTransaction, so a DependentTransaction never // actually gets deserialized. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2229:ImplementSerializationConstructors")] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2240:ImplementISerializableCorrectly")] [Serializable] public sealed class DependentTransaction : Transaction { bool blocking; // Create a transaction with the given settings // internal DependentTransaction( IsolationLevel isoLevel, InternalTransaction internalTransaction, bool blocking ) : base( isoLevel, internalTransaction ) { this.blocking = blocking; lock( this.internalTransaction ) { if( blocking ) { this.internalTransaction.State.CreateBlockingClone( this.internalTransaction ); } else { this.internalTransaction.State.CreateAbortingClone( this.internalTransaction ); } } } public void Complete() { if ( DiagnosticTrace.Verbose ) { MethodEnteredTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "DependentTransaction.Complete" ); } lock( this.internalTransaction ) { if( Disposed ) { throw new ObjectDisposedException( "Transaction" ); } if( this.complete ) { throw TransactionException.CreateTransactionCompletedException( SR.GetString( SR.TraceSourceLtm ) ); } this.complete = true; if( blocking ) { this.internalTransaction.State.CompleteBlockingClone( this.internalTransaction ); } else { this.internalTransaction.State.CompleteAbortingClone( this.internalTransaction ); } } if ( DiagnosticTrace.Information ) { DependentCloneCompleteTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), this.TransactionTraceId ); } if ( DiagnosticTrace.Verbose ) { MethodExitedTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "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
- BinaryNode.cs
- HttpTransportBindingElement.cs
- RubberbandSelector.cs
- EventLogPermissionHolder.cs
- LoadItemsEventArgs.cs
- SocketInformation.cs
- UrlPath.cs
- XpsFilter.cs
- FixedSOMContainer.cs
- WebPageTraceListener.cs
- PingReply.cs
- DBSchemaTable.cs
- ClassicBorderDecorator.cs
- ListViewItemSelectionChangedEvent.cs
- ProgressChangedEventArgs.cs
- RadioButtonList.cs
- XamlSerializer.cs
- GroupByExpressionRewriter.cs
- PointCollectionConverter.cs
- DiscardableAttribute.cs
- ErrorStyle.cs
- WindowsEditBoxRange.cs
- ApplyImportsAction.cs
- CompiledQuery.cs
- PropertyEmitterBase.cs
- WindowsListViewItemCheckBox.cs
- CancelRequestedQuery.cs
- TableCellsCollectionEditor.cs
- SimpleTextLine.cs
- WebBrowserEvent.cs
- ColumnHeaderConverter.cs
- ModifiableIteratorCollection.cs
- EditBehavior.cs
- GifBitmapEncoder.cs
- Base64Stream.cs
- PolicyLevel.cs
- XmlName.cs
- DuplicateDetector.cs
- DebugTrace.cs
- BinaryParser.cs
- DefaultValueTypeConverter.cs
- _emptywebproxy.cs
- ClientEventManager.cs
- UnsafeNativeMethodsPenimc.cs
- AssemblyName.cs
- SingleTagSectionHandler.cs
- RepeaterItemEventArgs.cs
- PersonalizationAdministration.cs
- Config.cs
- Accessible.cs
- StyleCollection.cs
- SymmetricKeyWrap.cs
- DataRowChangeEvent.cs
- ServiceBuildProvider.cs
- BoolExpr.cs
- MetadataItemEmitter.cs
- SignatureDescription.cs
- TableLayoutPanelDesigner.cs
- BindingMAnagerBase.cs
- _NegoState.cs
- SystemDropShadowChrome.cs
- ProviderConnectionPoint.cs
- SimpleType.cs
- InkSerializer.cs
- ListenerSessionConnection.cs
- CollectionViewGroupRoot.cs
- Highlights.cs
- WorkItem.cs
- WindowsSysHeader.cs
- TextPattern.cs
- PropertyStore.cs
- SimpleExpression.cs
- BitmapPalette.cs
- DataSourceViewSchemaConverter.cs
- ProjectedWrapper.cs
- MenuAdapter.cs
- Simplifier.cs
- HtmlInputRadioButton.cs
- WarningException.cs
- ListViewAutomationPeer.cs
- CompositeFontParser.cs
- LoginName.cs
- ListenUriMode.cs
- DesignerMetadata.cs
- ping.cs
- KeyGestureValueSerializer.cs
- XmlDataProvider.cs
- ObjectDataSourceStatusEventArgs.cs
- XmlWriter.cs
- GenericEnumConverter.cs
- TextEditorMouse.cs
- ThreadStateException.cs
- AsyncResult.cs
- XPathParser.cs
- ChannelReliableSession.cs
- RowsCopiedEventArgs.cs
- ValidationEventArgs.cs
- SqlFunctions.cs
- ListBase.cs
- RegularExpressionValidator.cs