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
- SoapMessage.cs
- DataGridPagerStyle.cs
- Rights.cs
- XmlTextReader.cs
- WebPartConnectionCollection.cs
- EntityType.cs
- BuildProviderUtils.cs
- Vector3DConverter.cs
- PublisherIdentityPermission.cs
- SystemIPv6InterfaceProperties.cs
- TimeSpanSecondsConverter.cs
- HttpVersion.cs
- FormattedTextSymbols.cs
- RuleSettings.cs
- WindowsProgressbar.cs
- DatePickerDateValidationErrorEventArgs.cs
- SessionState.cs
- CodeSubDirectory.cs
- SqlNode.cs
- LinearKeyFrames.cs
- DateTimeSerializationSection.cs
- DynamicAttribute.cs
- FileDataSourceCache.cs
- WindowsTooltip.cs
- SBCSCodePageEncoding.cs
- HyperLinkField.cs
- AsmxEndpointPickerExtension.cs
- HtmlElementErrorEventArgs.cs
- HttpRequestMessageProperty.cs
- XPathDocument.cs
- AdornerHitTestResult.cs
- ProfileSettings.cs
- Point3DAnimation.cs
- SamlAuthorizationDecisionClaimResource.cs
- EntityDataSourceContextDisposingEventArgs.cs
- Int32Converter.cs
- XmlHelper.cs
- SqlLiftWhereClauses.cs
- InvokeMemberBinder.cs
- PassportIdentity.cs
- PersonalizationAdministration.cs
- SoapProtocolImporter.cs
- ObjectDataSourceSelectingEventArgs.cs
- TypeExtensionSerializer.cs
- DocumentGrid.cs
- _SpnDictionary.cs
- JavaScriptString.cs
- ValuePatternIdentifiers.cs
- FlatButtonAppearance.cs
- RectangleConverter.cs
- DetailsViewPagerRow.cs
- RtfFormatStack.cs
- DateBoldEvent.cs
- StreamingContext.cs
- WebPartCancelEventArgs.cs
- ContainerParaClient.cs
- PrimitiveCodeDomSerializer.cs
- FormClosedEvent.cs
- ActivityPropertyReference.cs
- ExpressionBindings.cs
- RootProfilePropertySettingsCollection.cs
- ImmutablePropertyDescriptorGridEntry.cs
- FormattedTextSymbols.cs
- CreateUserWizard.cs
- RightsManagementResourceHelper.cs
- Substitution.cs
- SoapInteropTypes.cs
- DataGridViewColumnConverter.cs
- ProgressChangedEventArgs.cs
- TextBox.cs
- UrlMappingCollection.cs
- ValidationRule.cs
- MarginCollapsingState.cs
- FocusChangedEventArgs.cs
- DependencyPropertyHelper.cs
- ObjectConverter.cs
- PropertyInfoSet.cs
- ColorPalette.cs
- PopOutPanel.cs
- XmlElement.cs
- CopyCodeAction.cs
- CharacterBuffer.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- RemoteWebConfigurationHostServer.cs
- FormsAuthentication.cs
- DecoderFallback.cs
- SoapAttributeOverrides.cs
- _StreamFramer.cs
- EventManager.cs
- TextRenderer.cs
- ChannelHandler.cs
- InvalidComObjectException.cs
- ToolStripRenderEventArgs.cs
- DateTimeOffset.cs
- LocationUpdates.cs
- URLIdentityPermission.cs
- WorkflowElementDialog.cs
- Transactions.cs
- ValueUnavailableException.cs
- NotificationContext.cs