LogRecordSequence.BaseSequenceNumber Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

Namespace:   System.IO.Log
Assembly:  System.IO.Log (in System.IO.Log.dll)

public SequenceNumber BaseSequenceNumber { get; }

Property Value

Type: System.IO.Log.SequenceNumber

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

Exception Condition

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

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.

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);

.NET Framework
Available since 3.0
Return to top