Enlistment Class
Facilitates communication between an enlisted transaction participant and the transaction manager during the final phase of the transaction.
Assembly: System.Transactions (in System.Transactions.dll)
System.Transactions::Enlistment
System.Transactions::PreparingEnlistment
System.Transactions::SinglePhaseEnlistment
| Name | Description | |
|---|---|---|
![]() | Done() | Indicates that the transaction participant has completed its work. |
![]() | Equals(Object^) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | Finalize() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.) |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | MemberwiseClone() | |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
When the EnlistVolatile and EnlistDurable methods of the Transaction object are invoked to enlist a participant in a transaction, they return this object describing the enlistment.
During the final phase of the transaction commit, the transaction manager passes this object to a resource manager implementing the IEnlistmentNotification interface that has enlisted in a transaction. Specifically, the transaction manager calls either the Commit or the Rollback method of the participant, depending on whether the latter has decided to commit or roll back the transaction. The participant should call the Done method of this object to let the transaction manager know that it has completed its work.
An enlistment can call the Done method at anytime before it has called Prepared in the prepare phase. By doing so, the enlistment is casting a read only vote, meaning that it votes commit on the transaction but does not need to receive the final outcome. Note that, after the Done method is called, the enlisted participant receives no further notifications from the transaction manager.
The following example shows an implementation of the IEnlistmentNotification interface, and when the Done method should be called.
Available since 2.0
This type is thread safe.
PreparingEnlistment
IEnlistmentNotification
System.Transactions Namespace
Enlisting Resources As Participants In A Transaction

