共用方式為


Compensator.EndPrepare 方法

定義

告知 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

適用於