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
- XmlTextAttribute.cs
- Internal.cs
- ByteAnimationBase.cs
- SqlCommandSet.cs
- util.cs
- StorageMappingFragment.cs
- OuterGlowBitmapEffect.cs
- ExcCanonicalXml.cs
- EventMappingSettingsCollection.cs
- FlowDocumentReaderAutomationPeer.cs
- InputReportEventArgs.cs
- PartialCachingControl.cs
- DebuggerAttributes.cs
- FactoryGenerator.cs
- ObjectTag.cs
- XmlSchemaIdentityConstraint.cs
- CheckBoxList.cs
- CrossSiteScriptingValidation.cs
- TemplateBindingExpressionConverter.cs
- BitHelper.cs
- BCLDebug.cs
- FileUtil.cs
- DataServiceRequestException.cs
- Group.cs
- CapabilitiesState.cs
- HwndSource.cs
- SqlConnectionString.cs
- SmiContext.cs
- ClrPerspective.cs
- ReflectEventDescriptor.cs
- References.cs
- InvokePatternIdentifiers.cs
- ConfigXmlAttribute.cs
- MonitorWrapper.cs
- AtomServiceDocumentSerializer.cs
- IntSecurity.cs
- BooleanToVisibilityConverter.cs
- Lease.cs
- PaintValueEventArgs.cs
- SchemaImporterExtensionElement.cs
- Oid.cs
- XPathNodeList.cs
- WebPartHelpVerb.cs
- IntSecurity.cs
- WorkflowRuntimeService.cs
- ClientTargetCollection.cs
- FixedSOMTableRow.cs
- WMIGenerator.cs
- DrawListViewColumnHeaderEventArgs.cs
- DisposableCollectionWrapper.cs
- MeshGeometry3D.cs
- UiaCoreProviderApi.cs
- ControlBuilder.cs
- SvcMapFileSerializer.cs
- ObjectQuery.cs
- newinstructionaction.cs
- RoutedCommand.cs
- FontUnitConverter.cs
- ImportContext.cs
- PageContent.cs
- HtmlInputFile.cs
- ConfigXmlElement.cs
- ComponentResourceKeyConverter.cs
- QuaternionConverter.cs
- OleDbReferenceCollection.cs
- Transform3D.cs
- SystemNetworkInterface.cs
- sortedlist.cs
- ComponentResourceKey.cs
- SimpleMailWebEventProvider.cs
- AdornedElementPlaceholder.cs
- SQLMoney.cs
- PropertyGridCommands.cs
- GraphicsContext.cs
- HtmlTextViewAdapter.cs
- AdornerLayer.cs
- HttpConfigurationContext.cs
- SignatureToken.cs
- SmiEventStream.cs
- ListSourceHelper.cs
- MetafileEditor.cs
- PlanCompilerUtil.cs
- WorkflowValidationFailedException.cs
- SamlAuthorizationDecisionClaimResource.cs
- ImagingCache.cs
- SoapExtensionReflector.cs
- XmlSchemaNotation.cs
- EnvironmentPermission.cs
- FeatureAttribute.cs
- TextFormatterHost.cs
- DataGridViewRowCollection.cs
- AttributeCollection.cs
- LinkClickEvent.cs
- remotingproxy.cs
- SessionState.cs
- MessageVersion.cs
- KeyEvent.cs
- DbMetaDataCollectionNames.cs
- Variable.cs
- PublisherMembershipCondition.cs