Bagikan melalui


Compensator.EndPrepare Metode

Definisi

Memberi tahu Compensator Compensator Compensating Resource Manager (CRM) bahwa ia telah memiliki semua catatan log yang tersedia selama fase persiapan.

public:
 virtual bool EndPrepare();
public virtual bool EndPrepare ();
abstract member EndPrepare : unit -> bool
override this.EndPrepare : unit -> bool
Public Overridable Function EndPrepare () As Boolean

Mengembalikan

true jika berhasil; jika tidak, false.

Contoh

Contoh kode berikut menunjukkan implementasi metode ini.

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

Berlaku untuk