Compensator.EndPrepare 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
通知補償資源管理器(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