Share via


ContextUtil.DisableCommit Yöntem

Tanım

COM+ bağlamında hem biti hem consistentdone de biti false olarak ayarlar.

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

Özel durumlar

Kullanılabilir COM+ bağlamı yoktur.

Örnekler

Aşağıdaki kod örneği yöntemini çağırır 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

Açıklamalar

İstenirse, COM+ bağlamı geçerli işlemi durdurmak için oy kullanır, ancak yöntem dönüşünde nesne devre dışı bırakılmaz.

Şunlara uygulanır