Compensator.EndPrepare 方法

定义

通知补偿资源管理器 (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

适用于