ContextUtil.DisableCommit Метод
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Устанавливает для битов consistent
и done
значение false
в контексте COM+.
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+ голосует за прерывание текущей транзакции, но объект не деактивируется при возврате метода.
Применяется к
GitHub сайтында бізбен бірлесіп жұмыс істеу
Бұл мазмұнның көзін GitHub сайтында табуға болады. Онда сонымен бірге мәселелер мен өзгертулерді енгізу сұрауларын жасауға және қарап шығуға болады. Қосымша ақпарат алу үшін қатысушы нұсқаулығын қараңыз.