LogRecordSequence.Append Method

 
System_CAPS_noteNote

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

Writes a log record to the IRecordSequence.

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

NameDescription
System_CAPS_pubmethodAppend(ArraySegment<Byte>, SequenceNumber, SequenceNumber, RecordAppendOptions)

Writes a log record to the LogRecordSequence. This method cannot be inherited.

System_CAPS_pubmethodAppend(ArraySegment<Byte>, SequenceNumber, SequenceNumber, RecordAppendOptions, ReservationCollection)

Appends a log record to the IRecordSequence, using space previously reserved in the sequence. This method cannot be inherited.

System_CAPS_pubmethodAppend(IList<ArraySegment<Byte>>, SequenceNumber, SequenceNumber, RecordAppendOptions)

Appends a log record to the IRecordSequence. This method cannot be inherited.

System_CAPS_pubmethodAppend(IList<ArraySegment<Byte>>, SequenceNumber, SequenceNumber, RecordAppendOptions, ReservationCollection)

Appends a log record to the IRecordSequence, using space previously reserved in the sequence. This method cannot be inherited.

This example shows how to use the Append member

// 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...");
}
Return to top
Show: