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
- AsyncOperation.cs
- Menu.cs
- CriticalHandle.cs
- Cloud.cs
- TextTreeNode.cs
- MappingSource.cs
- UndirectedGraph.cs
- ConnectionPoint.cs
- ArgumentsParser.cs
- SmiMetaData.cs
- WmpBitmapEncoder.cs
- FontSource.cs
- HtmlToClrEventProxy.cs
- XmlSchemaProviderAttribute.cs
- safesecurityhelperavalon.cs
- XmlWrappingReader.cs
- DesignerObjectListAdapter.cs
- HttpModulesSection.cs
- WinEventHandler.cs
- UrlPropertyAttribute.cs
- ProxyHelper.cs
- SerialReceived.cs
- StructuralObject.cs
- KeySpline.cs
- TableRowCollection.cs
- QilStrConcat.cs
- PagedDataSource.cs
- IdnElement.cs
- PointCollectionConverter.cs
- TableRow.cs
- Timer.cs
- GroupDescription.cs
- LightweightEntityWrapper.cs
- ComponentEditorPage.cs
- ColumnTypeConverter.cs
- CommandLibraryHelper.cs
- DeploymentSectionCache.cs
- UriSectionReader.cs
- QuaternionRotation3D.cs
- HtmlFormWrapper.cs
- DeferredBinaryDeserializerExtension.cs
- TrustLevelCollection.cs
- SourceInterpreter.cs
- NumberFunctions.cs
- XmlNodeChangedEventArgs.cs
- TypedReference.cs
- TrayIconDesigner.cs
- ScrollPatternIdentifiers.cs
- PriorityItem.cs
- SqlLiftIndependentRowExpressions.cs
- NumberSubstitution.cs
- CallbackHandler.cs
- EntityDataSourceConfigureObjectContext.cs
- IIS7UserPrincipal.cs
- UnsafeNativeMethods.cs
- QilInvokeLateBound.cs
- ValueExpressions.cs
- GcHandle.cs
- RoutedEvent.cs
- Margins.cs
- BufferedGraphicsManager.cs
- SafeRegistryHandle.cs
- pingexception.cs
- TypeGeneratedEventArgs.cs
- WmlCommandAdapter.cs
- Win32KeyboardDevice.cs
- Border.cs
- odbcmetadatacolumnnames.cs
- MsmqEncryptionAlgorithm.cs
- DataGridViewCellValidatingEventArgs.cs
- SingleStorage.cs
- TemplatedWizardStep.cs
- CellConstantDomain.cs
- ShaperBuffers.cs
- RecordManager.cs
- PenContexts.cs
- SHA256Managed.cs
- RequestCache.cs
- AuthenticationSection.cs
- ObsoleteAttribute.cs
- PageAsyncTaskManager.cs
- ValidatedMobileControlConverter.cs
- RegexRunner.cs
- RefreshEventArgs.cs
- CodeParameterDeclarationExpression.cs
- safePerfProviderHandle.cs
- StructuralCache.cs
- ImageConverter.cs
- WebExceptionStatus.cs
- PopupEventArgs.cs
- GridViewUpdatedEventArgs.cs
- ProxyAssemblyNotLoadedException.cs
- SAPICategories.cs
- ByteViewer.cs
- Page.cs
- SEHException.cs
- FaultImportOptions.cs
- DataSourceSelectArguments.cs
- UserNameSecurityTokenParameters.cs
- UnsafeNativeMethodsCLR.cs