Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / tx / System / Transactions / TransactionInformation.cs / 1305376 / TransactionInformation.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Transactions { using System; using System.Transactions.Diagnostics; public class TransactionInformation { private InternalTransaction internalTransaction; internal TransactionInformation( InternalTransaction internalTransaction ) { this.internalTransaction = internalTransaction; } public string LocalIdentifier { get { if ( DiagnosticTrace.Verbose ) { MethodEnteredTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "TransactionInformation.get_LocalIdentifier" ); } try { return this.internalTransaction.TransactionTraceId.TransactionIdentifier; } finally { if ( DiagnosticTrace.Verbose ) { MethodEnteredTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "TransactionInformation.get_LocalIdentifier" ); } } } } public Guid DistributedIdentifier { get { if ( DiagnosticTrace.Verbose ) { MethodEnteredTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "TransactionInformation.get_DistributedIdentifier" ); } try { // syncronize to avoid potential ---- between accessing the DistributerIdentifier // and getting the transaction information entry populated... lock(this.internalTransaction) { return this.internalTransaction.State.get_Identifier( this.internalTransaction ); } } finally { if ( DiagnosticTrace.Verbose ) { MethodExitedTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "TransactionInformation.get_DistributedIdentifier" ); } } } } public DateTime CreationTime { get { return new DateTime( this.internalTransaction.CreationTime ); } } public TransactionStatus Status { get { if ( DiagnosticTrace.Verbose ) { MethodEnteredTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "TransactionInformation.get_Status" ); } try { return this.internalTransaction.State.get_Status( this.internalTransaction ); } finally { if ( DiagnosticTrace.Verbose ) { MethodExitedTraceRecord.Trace( SR.GetString( SR.TraceSourceLtm ), "TransactionInformation.get_Status" ); } } } } } } // 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
- DataRelationPropertyDescriptor.cs
- CompiledRegexRunnerFactory.cs
- TextWriterTraceListener.cs
- SafeMILHandleMemoryPressure.cs
- SatelliteContractVersionAttribute.cs
- WindowsHyperlink.cs
- MessageBox.cs
- sqlstateclientmanager.cs
- BamlBinaryReader.cs
- BatchWriter.cs
- LogWriteRestartAreaState.cs
- DefaultMemberAttribute.cs
- TemplatedWizardStep.cs
- _ConnectStream.cs
- FormatterConverter.cs
- ToolBarOverflowPanel.cs
- BatchStream.cs
- BuilderPropertyEntry.cs
- NonSerializedAttribute.cs
- FillRuleValidation.cs
- XmlnsCache.cs
- WebPartTransformerAttribute.cs
- DrawingImage.cs
- CodeTypeMemberCollection.cs
- BrowserTree.cs
- VScrollProperties.cs
- ZipFileInfoCollection.cs
- SuppressIldasmAttribute.cs
- DataObject.cs
- RowToParametersTransformer.cs
- ManualResetEvent.cs
- SqlBulkCopyColumnMappingCollection.cs
- LiteralControl.cs
- TableMethodGenerator.cs
- ShimAsPublicXamlType.cs
- PolicyStatement.cs
- SpAudioStreamWrapper.cs
- XmlIncludeAttribute.cs
- CodeNamespace.cs
- MultipleViewProviderWrapper.cs
- DesignUtil.cs
- ImageAttributes.cs
- BaseComponentEditor.cs
- RemotingException.cs
- PngBitmapEncoder.cs
- Pen.cs
- WebPartEditorApplyVerb.cs
- XPathBinder.cs
- XmlILStorageConverter.cs
- ImageBrush.cs
- EntityDesignerUtils.cs
- X509CertificateClaimSet.cs
- SoapProtocolReflector.cs
- SafeNativeMethods.cs
- User.cs
- ReflectionPermission.cs
- OutputScopeManager.cs
- Debug.cs
- ToolBarPanel.cs
- XmlSchemaAttributeGroupRef.cs
- InstanceStore.cs
- HttpInputStream.cs
- DefaultBinder.cs
- TypeKeyValue.cs
- AsyncWaitHandle.cs
- DBSchemaTable.cs
- ChannelParameterCollection.cs
- AccessibleObject.cs
- CollectionContainer.cs
- ConnectionInterfaceCollection.cs
- TreeNodeStyle.cs
- DesignerSerializationManager.cs
- MemoryMappedViewAccessor.cs
- UnsafeNativeMethods.cs
- OdbcCommandBuilder.cs
- Control.cs
- DecimalStorage.cs
- ResXResourceReader.cs
- DispatcherHookEventArgs.cs
- KeyPullup.cs
- WeakEventManager.cs
- AddInPipelineAttributes.cs
- CapiHashAlgorithm.cs
- SafeNativeMethods.cs
- CriticalFinalizerObject.cs
- FileIOPermission.cs
- WebPartZone.cs
- MaskedTextBoxDesigner.cs
- TemplateControlParser.cs
- ToolStripGripRenderEventArgs.cs
- DataControlImageButton.cs
- LocalFileSettingsProvider.cs
- ContainerParaClient.cs
- CopyEncoder.cs
- NativeWindow.cs
- FixedTextView.cs
- SqlCacheDependencyDatabaseCollection.cs
- GradientStop.cs
- DropSource.cs
- MemberPath.cs