Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / tx / System / Transactions / TransactionTraceIdentifier.cs / 1305376 / TransactionTraceIdentifier.cs
using System; namespace System.Transactions { ////// This identifier is used in tracing to distiguish instances /// of transaction objects. This identifier is only unique within /// a given AppDomain. /// internal struct TransactionTraceIdentifier { public static readonly TransactionTraceIdentifier Empty = new TransactionTraceIdentifier(); public TransactionTraceIdentifier( string transactionIdentifier, int cloneIdentifier ) { this.transactionIdentifier = transactionIdentifier; this.cloneIdentifier = cloneIdentifier; } private string transactionIdentifier; ////// The string representation of the transaction identifier. /// public string TransactionIdentifier { get { return this.transactionIdentifier; } } private int cloneIdentifier; ////// An integer value that allows different clones of the same /// transaction to be distiguished in the tracing. /// public int CloneIdentifier { get { return this.cloneIdentifier; } } public override int GetHashCode() { return base.GetHashCode(); // Don't have anything better to do. } public override bool Equals ( object objectToCompare ) { if ( ! ( objectToCompare is TransactionTraceIdentifier ) ) { return false; } TransactionTraceIdentifier id = (TransactionTraceIdentifier) objectToCompare; if ( ( id.TransactionIdentifier != this.TransactionIdentifier ) || ( id.CloneIdentifier != this.CloneIdentifier ) ) { return false; } return true; } public static bool operator==( TransactionTraceIdentifier id1, TransactionTraceIdentifier id2 ) { return id1.Equals( id2 ); } public static bool operator!=( TransactionTraceIdentifier id1, TransactionTraceIdentifier id2 ) { return !id1.Equals( id2 ); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ObjectListTitleAttribute.cs
- RepeaterDesigner.cs
- ObjectViewListener.cs
- ExtendedProperty.cs
- DbCommandDefinition.cs
- Switch.cs
- WorkflowQueuingService.cs
- FormViewUpdateEventArgs.cs
- basevalidator.cs
- NetStream.cs
- WorkingDirectoryEditor.cs
- FormCollection.cs
- MetadataPropertyCollection.cs
- FunctionDescription.cs
- RoleService.cs
- DesignDataSource.cs
- OracleBFile.cs
- CompilerHelpers.cs
- assemblycache.cs
- ActiveXSite.cs
- AspCompat.cs
- HttpListenerException.cs
- DataGridAutomationPeer.cs
- RowParagraph.cs
- MobileControlDesigner.cs
- ProfileSection.cs
- SettingsPropertyCollection.cs
- SyndicationDeserializer.cs
- ComponentCollection.cs
- ColumnMapTranslator.cs
- WpfSharedXamlSchemaContext.cs
- nulltextcontainer.cs
- CheckBox.cs
- NavigationPropertyEmitter.cs
- COSERVERINFO.cs
- GeneralTransform3DCollection.cs
- PersistenceIOParticipant.cs
- WebScriptServiceHostFactory.cs
- SafeViewOfFileHandle.cs
- MessageQueuePermissionEntryCollection.cs
- InputQueue.cs
- safesecurityhelperavalon.cs
- FrameworkPropertyMetadata.cs
- ResourceReferenceExpressionConverter.cs
- CaseInsensitiveHashCodeProvider.cs
- OutputScope.cs
- RefreshPropertiesAttribute.cs
- CacheEntry.cs
- HttpConfigurationSystem.cs
- ReachBasicContext.cs
- Sequence.cs
- TrackingServices.cs
- Cursors.cs
- URLString.cs
- TraceData.cs
- DesignTimeTemplateParser.cs
- XomlCompilerParameters.cs
- _ProxyChain.cs
- SiblingIterators.cs
- sqlser.cs
- ListComponentEditorPage.cs
- FastEncoder.cs
- SHA256CryptoServiceProvider.cs
- PrintPreviewDialog.cs
- ToolZone.cs
- VirtualDirectoryMapping.cs
- Registry.cs
- Substitution.cs
- WindowsListViewGroupHelper.cs
- ClaimComparer.cs
- GreaterThan.cs
- ScriptHandlerFactory.cs
- WebPartConnectionCollection.cs
- DefaultTextStore.cs
- ExecutedRoutedEventArgs.cs
- BrowserDefinition.cs
- WebBaseEventKeyComparer.cs
- BooleanProjectedSlot.cs
- TextTreeTextBlock.cs
- DataGridViewRowPrePaintEventArgs.cs
- WebPartMinimizeVerb.cs
- MobileUserControlDesigner.cs
- UnsafeNativeMethods.cs
- CompilerError.cs
- UInt64Converter.cs
- ValidatorUtils.cs
- AutomationPropertyInfo.cs
- SizeKeyFrameCollection.cs
- ParameterRetriever.cs
- complextypematerializer.cs
- KeyInfo.cs
- ServiceControllerDesigner.cs
- SerialStream.cs
- EmptyStringExpandableObjectConverter.cs
- BuildResult.cs
- MultiAsyncResult.cs
- BitConverter.cs
- ConsumerConnectionPointCollection.cs
- ExtensionDataObject.cs
- CodeObjectCreateExpression.cs