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
- RelatedView.cs
- SortedList.cs
- PeerCredentialElement.cs
- ContextMenuAutomationPeer.cs
- MsmqHostedTransportConfiguration.cs
- FormatterConverter.cs
- Win32SafeHandles.cs
- HostingEnvironmentException.cs
- MatrixAnimationBase.cs
- MaterializeFromAtom.cs
- _ChunkParse.cs
- MatrixCamera.cs
- ByteAnimation.cs
- SafeEventHandle.cs
- OleDbPermission.cs
- TypeUtils.cs
- DesignerGenericWebPart.cs
- CompositeClientFormatter.cs
- RectAnimationBase.cs
- TabItemWrapperAutomationPeer.cs
- TraceAsyncResult.cs
- CodeMethodReturnStatement.cs
- EntityPropertyMappingAttribute.cs
- DEREncoding.cs
- MarkupExtensionReturnTypeAttribute.cs
- RealizationDrawingContextWalker.cs
- FocusWithinProperty.cs
- HitTestDrawingContextWalker.cs
- PeerDefaultCustomResolverClient.cs
- _ShellExpression.cs
- CodeArrayIndexerExpression.cs
- SymLanguageType.cs
- ScrollViewerAutomationPeer.cs
- IImplicitResourceProvider.cs
- ExpressionEditorAttribute.cs
- ApplicationSecurityManager.cs
- Variable.cs
- PropertyPathWorker.cs
- Vector3DAnimation.cs
- XmlSchemaComplexType.cs
- JumpTask.cs
- BamlRecords.cs
- InvokeWebService.cs
- MarkupCompilePass1.cs
- SqlNamer.cs
- SettingsBase.cs
- SchemaMerger.cs
- Transform3DGroup.cs
- QilFactory.cs
- SelectionBorderGlyph.cs
- SaveWorkflowAsyncResult.cs
- SubstitutionList.cs
- MarginsConverter.cs
- Rss20ItemFormatter.cs
- ContextMenuStripActionList.cs
- SqlDataSourceSelectingEventArgs.cs
- Double.cs
- SchemaImporterExtensionElement.cs
- TextModifier.cs
- BitmapEffectGroup.cs
- PartialTrustHelpers.cs
- Encoding.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- RootProfilePropertySettingsCollection.cs
- ServerIdentity.cs
- FormatterServicesNoSerializableCheck.cs
- TrackingRecord.cs
- CredentialCache.cs
- XMLDiffLoader.cs
- Region.cs
- Win32KeyboardDevice.cs
- Directory.cs
- SchemaNamespaceManager.cs
- CompositeControl.cs
- LocalizabilityAttribute.cs
- ObjectViewFactory.cs
- RequestChannelBinder.cs
- SoapFormatExtensions.cs
- SystemColorTracker.cs
- Monitor.cs
- TemplateParser.cs
- KeySplineConverter.cs
- StandardTransformFactory.cs
- ModuleBuilderData.cs
- CellRelation.cs
- XPathParser.cs
- _ListenerResponseStream.cs
- DynamicPropertyReader.cs
- GenericWebPart.cs
- IntegerFacetDescriptionElement.cs
- XsdDuration.cs
- UriTemplatePathPartiallyEquivalentSet.cs
- MetafileHeaderWmf.cs
- ObjectManager.cs
- ChannelSinkStacks.cs
- Document.cs
- ScrollProperties.cs
- WorkflowTransactionService.cs
- MainMenu.cs
- SqlUserDefinedAggregateAttribute.cs