ContextUtil.MyTransactionVote プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ContextUtil.MyTransactionVote プロパティの意味・解説 

ContextUtil.MyTransactionVote プロパティ

COM+ コンテキストconsistent ビット取得または設定します

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

Public Shared Property MyTransactionVote
 As TransactionVote
Dim value As TransactionVote

value = ContextUtil.MyTransactionVote

ContextUtil.MyTransactionVote = value
public static TransactionVote MyTransactionVote
 { get; set; }
public:
static property TransactionVote MyTransactionVote {
    TransactionVote get ();
    void set (TransactionVote value);
}
/** @property */
public static TransactionVote get_MyTransactionVote
 ()

/** @property */
public static void set_MyTransactionVote
 (TransactionVote value)
public static function get
 MyTransactionVote () : TransactionVote

public static function set
 MyTransactionVote (value : TransactionVote)

プロパティ
TransactionVote 値である、Commit または Abortいずれか

例外例外
例外種類条件

COMException

使用できる COM+ コンテキストがありません。

PlatformNotSupportedException

プラットフォームWindows 2000 以降ではありません。

解説解説
使用例使用例

MyTransactionVote プロパティ使用してトランザクション ServicedComponent を作成する方法次のコード例示します

<Transaction()>  _
Public Class TransactionalComponent
    Inherits ServicedComponent
    
    
    Public Sub TransactionalMethod(ByVal
 data As String) 
        
        ContextUtil.DeactivateOnReturn = True
        ContextUtil.MyTransactionVote = TransactionVote.Abort
        
        ' Do work with data. Return if any errors occur.
        ' Vote to commit. If any errors occur, this code will not execute.
        ContextUtil.MyTransactionVote = TransactionVote.Commit
    
    End Sub 'TransactionalMethod
 
End Class 'TransactionalComponent

[Transaction]
public class TransactionalComponent : ServicedComponent
{

    public void TransactionalMethod (string
 data)
    {

      ContextUtil.DeactivateOnReturn = true;
      ContextUtil.MyTransactionVote = TransactionVote.Abort;

      // Do work with data. Return if any errors occur.

      // Vote to commit. If any errors occur, this code will not execute.
      ContextUtil.MyTransactionVote = TransactionVote.Commit;

    }

}
[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;
   }

};

/** @attribute Transaction()
 */
public class TransactionalComponent extends
 ServicedComponent
{
    public void TransactionalMethod(String
 data)
    {
        ContextUtil.set_DeactivateOnReturn(true);
        ContextUtil.set_MyTransactionVote(TransactionVote.Abort);

        // Do work with data. Return if any errors occur.
        // Vote to commit. If any errors occur, this code will not execute.
        ContextUtil.set_MyTransactionVote(TransactionVote.Commit);
    } //TransactionalMethod 
} //TransactionalComponent
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からContextUtil.MyTransactionVote プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からContextUtil.MyTransactionVote プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からContextUtil.MyTransactionVote プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「ContextUtil.MyTransactionVote プロパティ」の関連用語

ContextUtil.MyTransactionVote プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ContextUtil.MyTransactionVote プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS