次の方法で共有


TransactionAttribute コンストラクタ (TransactionOption)

TransactionAttribute クラスの新しいインスタンスを初期化して、トランザクション タイプを指定します。

名前空間: System.EnterpriseServices
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)

構文

'宣言
Public Sub New ( _
    val As TransactionOption _
)
'使用
Dim val As TransactionOption

Dim instance As New TransactionAttribute(val)
public TransactionAttribute (
    TransactionOption val
)
public:
TransactionAttribute (
    TransactionOption val
)
public TransactionAttribute (
    TransactionOption val
)
public function TransactionAttribute (
    val : TransactionOption
)

パラメータ

使用例

新しい TransactionAttribute を作成するコード例を次に示します。

<Transaction(TransactionOption.Supported)>  _
Public Class TransactionAttribute_Ctor_TransactionOption
    Inherits ServicedComponent
End Class 'TransactionAttribute_Ctor_TransactionOption

<Transaction(TransactionOption.Supported, Isolation := TransactionIsolationLevel.Serializable)>  _
Public Class TransactionAttribute_Ctor_TransactionOption_Isolation
    Inherits ServicedComponent
End Class 'TransactionAttribute_Ctor_TransactionOption_Isolation

<Transaction(TransactionOption.Supported, Isolation := TransactionIsolationLevel.Serializable, Timeout := 30)>  _
Public Class TransactionAttribute_Ctor_TransactionOption_Isolation_Timeout
    Inherits ServicedComponent
End Class 'TransactionAttribute_Ctor_TransactionOption_Isolation_Timeout
[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

.NET Framework のセキュリティ

  • 直前の呼び出し元に対する完全な信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細については、「」を参照してください。

プラットフォーム

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

開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。

バージョン情報

.NET Framework

サポート対象 : 2.0、1.1、1.0

参照

関連項目

TransactionAttribute クラス
TransactionAttribute メンバ
System.EnterpriseServices 名前空間