Compensator.EndPrepare 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
告知 Compensating Resource Manager (CRM) 補償器,它在準備階段期間已經擁有所有可用的記錄檔資料錄。
public:
virtual bool EndPrepare();
public virtual bool EndPrepare ();
abstract member EndPrepare : unit -> bool
override this.EndPrepare : unit -> bool
Public Overridable Function EndPrepare () As Boolean
傳回
如果成功即為 true
;否則為 false
。
範例
下列程式代碼範例示範此方法的實作。
public:
virtual bool EndPrepare() override
{
// Allow the transaction to proceed onlyif we have received a prepare
// record.
if (receivedPrepareRecord)
{
return true;
}
else
{
return false;
}
}
public override bool EndPrepare ()
{
// Allow the transaction to proceed onlyif we have received a prepare record.
if (receivedPrepareRecord)
{
return(true);
}
else
{
return(false);
}
}
Public Overrides Function EndPrepare() As Boolean
' Allow the transaction to proceed onlyif we have received a prepare record.
If receivedPrepareRecord Then
Return True
Else
Return False
End If
End Function 'EndPrepare