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
- XpsS0ValidatingLoader.cs
- BlockCollection.cs
- ProfileGroupSettings.cs
- FormViewUpdateEventArgs.cs
- UnsafeNativeMethodsTablet.cs
- XhtmlBasicPhoneCallAdapter.cs
- RuntimeHelpers.cs
- SQLRoleProvider.cs
- KeysConverter.cs
- TargetControlTypeAttribute.cs
- GroupBoxAutomationPeer.cs
- BaseTemplateCodeDomTreeGenerator.cs
- DataGridCellClipboardEventArgs.cs
- ProgramNode.cs
- HtmlLink.cs
- ButtonFieldBase.cs
- DataServiceHostWrapper.cs
- GlyphElement.cs
- WebReferencesBuildProvider.cs
- DbProviderFactory.cs
- ExpressionNode.cs
- Menu.cs
- ToolStripHighContrastRenderer.cs
- XmlReaderSettings.cs
- Label.cs
- StylusPointProperty.cs
- FilterQuery.cs
- NetNamedPipeSecurityElement.cs
- SQLBoolean.cs
- TransactionProtocolConverter.cs
- _SpnDictionary.cs
- SystemResources.cs
- MasterPageParser.cs
- XPathScanner.cs
- OleDbConnectionInternal.cs
- DataBinding.cs
- BuildDependencySet.cs
- ClientScriptManager.cs
- URIFormatException.cs
- FrameworkElementFactoryMarkupObject.cs
- DmlSqlGenerator.cs
- MultiByteCodec.cs
- PersistenceProviderFactory.cs
- ScrollProviderWrapper.cs
- SqlDataSourceView.cs
- ListenerElementsCollection.cs
- StylusPointPropertyInfoDefaults.cs
- TraceSwitch.cs
- IndependentlyAnimatedPropertyMetadata.cs
- PropertyStore.cs
- OleDbCommand.cs
- Interlocked.cs
- TransactedReceiveData.cs
- SchemaImporter.cs
- DoubleAnimation.cs
- PageFunction.cs
- PrintDialogDesigner.cs
- HostedNamedPipeTransportManager.cs
- ExpressionBindingCollection.cs
- KeyedHashAlgorithm.cs
- Tag.cs
- StandardTransformFactory.cs
- SqlDataSourceStatusEventArgs.cs
- DataSourceXmlSerializer.cs
- MetricEntry.cs
- CharUnicodeInfo.cs
- TemplateControl.cs
- TableSectionStyle.cs
- XmlnsPrefixAttribute.cs
- WebCategoryAttribute.cs
- FixedSOMGroup.cs
- WebPartManagerDesigner.cs
- DataGridViewSelectedRowCollection.cs
- OptimalBreakSession.cs
- BrowserCapabilitiesFactoryBase.cs
- DatagridviewDisplayedBandsData.cs
- HtmlInputReset.cs
- _HelperAsyncResults.cs
- ComponentCache.cs
- DictionarySurrogate.cs
- LineProperties.cs
- WindowsListViewItemCheckBox.cs
- Geometry3D.cs
- QilInvokeEarlyBound.cs
- ToolStripSettings.cs
- Model3DGroup.cs
- GestureRecognizer.cs
- BinaryCommonClasses.cs
- ControlHelper.cs
- LoginName.cs
- HtmlFormWrapper.cs
- SoapElementAttribute.cs
- BindingCompleteEventArgs.cs
- hebrewshape.cs
- BaseDataList.cs
- ParameterModifier.cs
- CodeRegionDirective.cs
- BufferedReadStream.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- StringFunctions.cs