Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / TransactionBridge / Microsoft / Transactions / Bridge / Enlistment.cs / 1 / Enlistment.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- using System; namespace Microsoft.Transactions.Bridge { [Flags] enum Notifications { Phase0 = 0x000001, // Enlistment wants/will do phase-0 notifications TwoPhaseCommit = 0x000002, // Enlistment wants/will do two phase commit notifications Outcome = 0x000004, // Enlistment wants/will do outcome notifications AllProtocols = (Notifications.Phase0 | Notifications.TwoPhaseCommit | Notifications.Outcome), InDoubt = 0x000008, // Enlistment can handle in-doubt status reports Volatile = 0x000010, // Enlistment should not be recovered All = (Notifications.AllProtocols | Notifications.InDoubt | Notifications.Volatile) } ////// The Enlistment type defines the enlistment, which is the mapping of /// the transaction from provider to PPL to TM. /// sealed class Enlistment { public Enlistment( ) { this.localTransactionId = Guid.Empty; this.enlistmentId = Guid.NewGuid( ); this.remoteTransactionId = null; this.recoveryData = new byte[0]; this.transactionManagerContext = null; this.protocolProviderContext = null; this.notificationMask = Notifications.AllProtocols; } public Enlistment( Guid enlistmentId ) { this.localTransactionId = Guid.Empty; this.enlistmentId = enlistmentId; this.remoteTransactionId = null; this.recoveryData = new byte[0]; this.transactionManagerContext = null; this.protocolProviderContext = null; this.notificationMask = Notifications.AllProtocols; } public Guid EnlistmentId { get{ return enlistmentId; } } public Guid LocalTransactionId { get{ return localTransactionId; } set{ localTransactionId = value; } } public string RemoteTransactionId { get{ return remoteTransactionId; } set{ remoteTransactionId = value; } } public object TransactionManagerContext { get{ return transactionManagerContext; } set{ transactionManagerContext = value; } } public object ProtocolProviderContext { get{ return protocolProviderContext; } set{ protocolProviderContext = value; } } public byte[] GetRecoveryData() { return (byte[])recoveryData.Clone(); } public void SetRecoveryData(byte[] data) { if (data != null) recoveryData = (byte[])data.Clone(); else recoveryData = new byte[0]; } public Notifications NotificationMask { get { return notificationMask; } set { notificationMask = value; } } override public string ToString( ) { return this.GetType( ).ToString( ) + " enlistment ID = " + enlistmentId.ToString( "B", null ) + " transaction ID = " + localTransactionId.ToString( "B", null ); } public EnlistmentOptions EnlistmentOptions { get{ return this.enlistmentOptions; } set{ this.enlistmentOptions = value; } } // // // private Guid localTransactionId; private Guid enlistmentId; private string remoteTransactionId; private byte[] recoveryData; private Notifications notificationMask; private EnlistmentOptions enlistmentOptions; private object transactionManagerContext; private object protocolProviderContext; } } // 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
- _NegoStream.cs
- ISCIIEncoding.cs
- AttachmentCollection.cs
- CompilerErrorCollection.cs
- DeferredSelectedIndexReference.cs
- WindowHideOrCloseTracker.cs
- ConnectionStringSettingsCollection.cs
- SurrogateChar.cs
- Timeline.cs
- ThreadExceptionEvent.cs
- MobileControlBuilder.cs
- ListenerAdapterBase.cs
- HttpRuntime.cs
- ObjectPersistData.cs
- ClientType.cs
- DataGridCaption.cs
- DataGridPagingPage.cs
- RtfControls.cs
- ReadOnlyDataSource.cs
- TextServicesContext.cs
- BulletedList.cs
- CollectionCodeDomSerializer.cs
- Switch.cs
- SecurityContextSecurityTokenAuthenticator.cs
- SQLSingleStorage.cs
- XslCompiledTransform.cs
- DelegatingStream.cs
- ActiveXSite.cs
- DataGridViewButtonColumn.cs
- ActivitiesCollection.cs
- IndexedWhereQueryOperator.cs
- HasCopySemanticsAttribute.cs
- shaper.cs
- XhtmlConformanceSection.cs
- CodeSnippetCompileUnit.cs
- LoggedException.cs
- SapiRecoContext.cs
- HttpTransportSecurityElement.cs
- Cast.cs
- ToolboxComponentsCreatingEventArgs.cs
- CodeComment.cs
- UniqueConstraint.cs
- BatchServiceHost.cs
- COAUTHIDENTITY.cs
- ContractBase.cs
- MemoryPressure.cs
- VarRefManager.cs
- SplitterEvent.cs
- WorkingDirectoryEditor.cs
- InputProcessorProfiles.cs
- PrintingPermissionAttribute.cs
- GeneralTransform3DCollection.cs
- NullableDoubleMinMaxAggregationOperator.cs
- XmlSchemaSimpleContentExtension.cs
- WebPartConnectionsEventArgs.cs
- HtmlImage.cs
- TypePropertyEditor.cs
- Queue.cs
- FigureHelper.cs
- BuildProviderUtils.cs
- DataGridCellClipboardEventArgs.cs
- SocketInformation.cs
- Win32Exception.cs
- FolderBrowserDialog.cs
- PrtCap_Base.cs
- WorkflowInlining.cs
- FrameSecurityDescriptor.cs
- GeneralTransformGroup.cs
- GotoExpression.cs
- PermissionAttributes.cs
- Helper.cs
- FontCollection.cs
- HealthMonitoringSection.cs
- QuotedPrintableStream.cs
- CodeCatchClause.cs
- SymmetricKey.cs
- BamlLocalizableResourceKey.cs
- DataGridHeaderBorder.cs
- NativeMethods.cs
- ValuePatternIdentifiers.cs
- NameSpaceExtractor.cs
- TypeConverter.cs
- JsonDeserializer.cs
- EventNotify.cs
- PolyBezierSegment.cs
- ConnectionsZoneDesigner.cs
- SchemaCollectionPreprocessor.cs
- oledbmetadatacolumnnames.cs
- PermissionSet.cs
- RemotingSurrogateSelector.cs
- WebHttpSecurityElement.cs
- __Filters.cs
- LexicalChunk.cs
- SharedStatics.cs
- CachingParameterInspector.cs
- MeshGeometry3D.cs
- BuildTopDownAttribute.cs
- StringDictionaryEditor.cs
- HttpProfileBase.cs
- ChannelEndpointElementCollection.cs