This documentation is archived and is not being maintained.

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
)
public TransactionAttribute (
	TransactionOption val
)
public function TransactionAttribute (
	val : TransactionOption
)

Parameters

val

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
{
}

/** @attribute Transaction(TransactionOption.Supported)
 */
public class TransactionAttribute_Ctor_TransactionOption extends ServicedComponent
{
} //TransactionAttribute_Ctor_TransactionOption

/** @attribute Transaction(TransactionOption.Supported, Isolation = 
    TransactionIsolationLevel.Serializable)
 */
public class TransactionAttribute_Ctor_TransactionOption_Isolation 
    extends ServicedComponent
{
} //TransactionAttribute_Ctor_TransactionOption_Isolation

/** @attribute Transaction(TransactionOption.Supported, Isolation = 
    TransactionIsolationLevel.Serializable, Timeout = 30)
 */
public class TransactionAttribute_Ctor_TransactionOption_Isolation_Timeout 
    extends ServicedComponent
{
} //TransactionAttribute_Ctor_TransactionOption_Isolation_Timeout

  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0
Show: