ContextUtil.DisableCommit メソッド

定義

COM+ コンテキストの consistent ビットと done ビットを false に設定します。

public:
 static void DisableCommit();
public static void DisableCommit ();
static member DisableCommit : unit -> unit
Public Shared Sub DisableCommit ()

例外

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

次のコード例では、 メソッドを DisableCommit 呼び出します。

[Transaction(TransactionOption::Required)]
public ref class ContextUtil_DisableCommit: public ServicedComponent
{
public:
   void Example()
   {
      // Set both the consistent bit and the done bit to false for the
      // current COM+ context.
      ContextUtil::DisableCommit();
   }
};
[Transaction(TransactionOption.Required)]
public class ContextUtil_DisableCommit : ServicedComponent
{
    public void Example()
    {
        // Set both the consistent bit and the done bit to false for the
        // current COM+ context.
        ContextUtil.DisableCommit();
    }
}
<Transaction(TransactionOption.Required)>  _
Public Class ContextUtil_DisableCommit
    Inherits ServicedComponent
    
    Public Sub Example() 
        ' Set both the consistent bit and the done bit to false for the
        ' current COM+ context.
        ContextUtil.DisableCommit()
    
    End Sub
End Class

注釈

要求された場合、COM+ コンテキストは現在のトランザクションを中止することを投票しますが、メソッドの戻り時にオブジェクトは非アクティブ化されません。

適用対象