Пример #1
0
        internal async Task <LogRecord> SeekToLastRecord()
        {
            Utility.Assert(this.endingRecordPosition == long.MaxValue, "this.endingRecordPosition == Int64.MaxValue");
            Utility.Assert(
                LogRecord.IsInvalidRecord(this.endRecord),
                "LogRecord.IsInvalidRecord(this.endRecord) == true. this.endRecord: {0}",
                this.endRecord);

            this.readStream.Position = this.readStream.Length;
            this.endRecord           = await LogRecord.ReadPreviousRecordAsync(this.readStream).ConfigureAwait(false);

            return(this.endRecord);
        }
Пример #2
0
 internal async Task <LogRecord> GetPreviousLogRecord(ulong recordPosition)
 {
     this.readStream.Position = (long)recordPosition;
     return(await LogRecord.ReadPreviousRecordAsync(this.readStream).ConfigureAwait(false));
 }