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 구조입니다. 사용자 데이터 (단일 BLOB) 외에도 여기에 디버깅 또는 오류 찾기에 대 한 유용한 추가 필드 포함 됩니다. Flags 필드 어느 시점에서이 레코드를 기억 하는 여부에 대 한 추가 정보를 제공 하는 비트 필드는 기록 된 경우. Sequence 필드는 로그 레코드의 시퀀스 번호를 제공 합니다. 대부분의 경우에서 시퀀스 번호는 순차적 되지만 반드시 내부 로그 레코드는 Manager CRM (Compensating Resource) Compensator에 배달 되지 않는 인해 연속 되지 않습니다.

속성

Flags

로그 레코드가 쓰여진 시기를 나타내는 값을 가져옵니다.

Record

로그 레코드 사용자 데이터를 가져옵니다.

Sequence

로그 레코드의 시퀀스 번호입니다.

메서드

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상