ContextUtil.SetAbort 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
COM+ 컨텍스트에서 consistent
비트를 false
로 설정하고 done
비트를 true
로 설정합니다.
public:
static void SetAbort();
public static void SetAbort ();
static member SetAbort : unit -> unit
Public Shared Sub SetAbort ()
예외
사용 가능한 COM+ 컨텍스트가 없는 경우
예제
다음 코드 예제에서는이 메서드를 사용 하는 방법을 보여 줍니다.
// Commit or abort the transaction
if (AllowCommit)
{
ContextUtil::SetComplete();
}
else
{
ContextUtil::SetAbort();
}
// Commit or abort the transaction
if (commit)
{
ContextUtil.SetComplete();
}
else
{
ContextUtil.SetAbort();
}
' Commit or abort the transaction
If commit Then
ContextUtil.SetComplete()
Else
ContextUtil.SetAbort()
End If
설명
메시지가 표시되면 컨텍스트가 현재 트랜잭션을 중단하도록 투표하고 메서드 반환에서 개체가 비활성화됩니다.