RecordAppendOptions Enumeration

Specifies how records are appended.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace: System.IO.Log
Assembly: System.IO.Log (in system.io.log.dll)

[FlagsAttribute] 
public enum RecordAppendOptions
/** @attribute FlagsAttribute() */ 
public enum RecordAppendOptions
FlagsAttribute 
public enum RecordAppendOptions

 Member nameDescription
ForceAppendThe 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.  
ForceFlushThe record sequence should flush any internal buffers after this record is appended. When the Append operation completes, the specified record has been durably written.  
NoneData 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);

    Console.WriteLine("Done...");
}

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show: