RecordAppendOptions Enumeration

RecordAppendOptions Enumeration


Specifies how records are appended.

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

public enum RecordAppendOptions

Member nameDescription

The record sequence should begin the process of flushing internal buffers after this record is appended. This does not indicate that the record should be durably written before the Append operation completes. To get that behavior, specify the ForceFlush flag.


The record sequence should flush any internal buffers after this record is appended. When the Append operation completes, the specified record has been durably written.


Data is written lazily.

The following example shows how to use this enumeration with the Append method to append a record to a log sequence.

// Append records. Appending three records.  
public void AppendRecords()
    Console.WriteLine("Appending Log Records...");
    SequenceNumber previous = SequenceNumber.Invalid;

    previous = sequence.Append(CreateData("Hello World!"), SequenceNumber.Invalid, SequenceNumber.Invalid, RecordAppendOptions.ForceFlush);
    previous = sequence.Append(CreateData("This is my first Logging App"), SequenceNumber.Invalid, SequenceNumber.Invalid, RecordAppendOptions.ForceFlush);
    previous = sequence.Append(CreateData("Using LogRecordSequence..."), SequenceNumber.Invalid, SequenceNumber.Invalid, RecordAppendOptions.ForceFlush);


.NET Framework
Available since 3.0
Return to top
© 2015 Microsoft