Share via


LogRecord クラス

定義

COM+ CrmLogRecordRead 構造体として配信された非構造化ログ レコードを表します。 このクラスは継承できません。

public ref class LogRecord sealed
public sealed class LogRecord
type LogRecord = class
Public NotInheritable Class LogRecord
継承
LogRecord

次のコード例では、このクラスの使用方法を示します。

public:
    virtual bool AbortRecord(LogRecord^ log) override
    {

        // Check the validity of the record.
        if (log == nullptr)
        {
            return true;
        }
        array<Object^>^ record = dynamic_cast<array<Object^>^>(log->Record);
        if (record == nullptr)
        {
            return true;
        }
        if (record->Length != 2)
        {
            return true;
        }

        // Extract old account data from the record.
        String^ filename = (String^) record[0];
        int balance = (int) record[1];

        // Restore the old state of the account.
        WriteAccountBalance(filename, balance);

        return false;
    }
public override bool AbortRecord (LogRecord log)
{

    // Check the validity of the record.
    if (log == null) return(true);
    Object[] record = log.Record as Object[];
    if (record == null) return(true);
    if (record.Length != 2) return(true);

    // Extract old account data from the record.
    string filename = (string) record[0];
    int balance = (int) record[1];

    // Restore the old state of the account.
    AccountManager.WriteAccountBalance(filename, balance);

    return(false);
}
Public Overrides Function AbortRecord(ByVal log As LogRecord) As Boolean 
    
    ' Check the validity of the record.
    If log Is Nothing Then
        Return True
    End If
    Dim record As [Object]() = log.Record
    
    If record Is Nothing Then
        Return True
    End If
    If record.Length <> 2 Then
        Return True
    End If 
    ' Extract old account data from the record.
    Dim filename As String = CStr(record(0))
    Dim balance As Integer = Fix(record(1))
    
    ' Restore the old state of the account.
    AccountManager.WriteAccountBalance(filename, balance)
    
    Return False

End Function 'AbortRecord

注釈

非構造化ログ レコードは、COM+ CrmLogRecordRead 構造として配信されます。 これには、ユーザー データ (1 つの BLOB) に加えて、デバッグやエラー検出に役立つ追加のフィールドが含まれています。 フィールドは Flags ビット フィールドであり、ある時点でこのレコードが忘れられていたかどうか、およびいつ書き込まれたかについての詳細情報を提供します。 フィールドには Sequence 、ログ レコードのシーケンス番号が表示されます。 ほとんどの場合、シーケンス番号はシーケンシャルですが、補正Resource Manager (CRM) 補正器に配信されない内部ログ レコードが原因で連続しているとは限りません。

プロパティ

Flags

ログ レコードがいつ書き込まれたかを示す値を取得します。

Record

ログ レコード ユーザー データを取得します。

Sequence

ログ レコードのシーケンス番号。

メソッド

Equals(Object)

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)

適用対象