Append Method

LogRecordSequence.Append Method

Writes a log record to the IRecordSequence.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  NameDescription
Public method Append(ArraySegment<Byte>, SequenceNumber, SequenceNumber, RecordAppendOptions) Writes a log record to the LogRecordSequence. This method cannot be inherited.
Public method Append(IList<ArraySegment<Byte>>, SequenceNumber, SequenceNumber, RecordAppendOptions) Appends a log record to the IRecordSequence. This method cannot be inherited.
Public method Append(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.
Public method Append(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.
Top

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

Community Additions

ADD
Show:
© 2016 Microsoft