LogRecordSequence.BaseSequenceNumber Property

Definition

Gets the sequence number of the first valid record in the current LogRecordSequence.

public:
 property System::IO::Log::SequenceNumber BaseSequenceNumber { System::IO::Log::SequenceNumber get(); };
public System.IO.Log.SequenceNumber BaseSequenceNumber { get; }
member this.BaseSequenceNumber : System.IO.Log.SequenceNumber
Public ReadOnly Property BaseSequenceNumber As SequenceNumber

Property Value

The lowest sequence number that corresponds to a valid record in the LogRecordSequence.

Implements

Exceptions

The property was accessed after the sequence has been disposed of.

Examples

This example shows how to use the BaseSequenceNumber member in a loop.

foreach (LogRecord record in sequence1.ReadLogRecords(sequence1.BaseSequenceNumber, LogRecordEnumeratorType.Next))
{
    byte[] data = new byte[record.Data.Length];
    record.Data.Read(data, 0, (int)record.Data.Length);
    string mystr = enc.GetString(data);
    Console.WriteLine("    {0}", mystr);
}
For Each record In sequence1.ReadLogRecords(sequence1.BaseSequenceNumber, LogRecordEnumeratorType.Next)
    Dim data(record.Data.Length - 1) As Byte
    record.Data.Read(data, 0, CInt(Fix(record.Data.Length)))
    Dim mystr As String = enc.GetString(data)
    Console.WriteLine("    {0}", mystr)
Next record

Remarks

Valid sequence numbers are greater than or equal to BaseSequenceNumber and less than LastSequenceNumber.

The value of this property can be changed by calling the WriteRestartArea method or AdvanceBaseSequenceNumber method.

Applies to