Export (0) Print
Expand All

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

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...");
        }

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft