ContextUtil.DisableCommit Metoda
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Nastaví bit i consistent bit na done v false kontextu modelu COM+.
public:
static void DisableCommit();
public static void DisableCommit ();
static member DisableCommit : unit -> unit
Public Shared Sub DisableCommit ()
Výjimky
Není k dispozici žádný kontext modelu COM+.
Příklady
Následující příklad kódu volá metodu 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
Poznámky
Pokud se zobrazí dotaz, kontext modelu COM + hlasuje o přerušení aktuální transakce, ale objekt není deaktivován při vrácení metody.