TransactionVote Enumeration

 

Specifies the values allowed for transaction outcome voting.

Namespace:   System.EnterpriseServices
Assembly:  System.EnterpriseServices (in System.EnterpriseServices.dll)

[SerializableAttribute]
[ComVisibleAttribute(false)]
public enum class TransactionVote

Member nameDescription
Abort

Aborts the current transaction.

Commit

Commits the current transaction.

This enumeration is used by the ContextUtil class.

The following code example demonstrates the use of this enumeration.


[assembly:System::Reflection::AssemblyKeyFile("Transaction.snk")];
[Transaction]
public ref class TransactionalComponent: public ServicedComponent
{
public:
   void TransactionalMethod( String^ data )
   {
      ContextUtil::DeactivateOnReturn = true;
      ContextUtil::MyTransactionVote = TransactionVote::Abort;

      // do work with data
      ContextUtil::MyTransactionVote = TransactionVote::Commit;
   }

};

.NET Framework
Available since 1.1
Return to top
Show: