TransactionAttribute Constructor (TransactionOption)

 

Initializes a new instance of the TransactionAttribute class, specifying the transaction type.

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

public TransactionAttribute(
	TransactionOption val
)

Parameters

val
Type: System.EnterpriseServices.TransactionOption

The specified transaction type, a TransactionOption value.

The following code example creates a new TransactionAttribute.

[Transaction(TransactionOption.Supported)]
public class TransactionAttribute_Ctor_TransactionOption : ServicedComponent
{
}

[Transaction(TransactionOption.Supported,
     Isolation=TransactionIsolationLevel.Serializable)]
public class TransactionAttribute_Ctor_TransactionOption_Isolation :
    ServicedComponent
{
}

[Transaction(TransactionOption.Supported,
     Isolation=TransactionIsolationLevel.Serializable,
     Timeout=30)]
public class TransactionAttribute_Ctor_TransactionOption_Isolation_Timeout :
     ServicedComponent
{
}

.NET Framework
Available since 1.1
Return to top
Show: