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); }
internal async Task <LogRecord> GetPreviousLogRecord(ulong recordPosition) { this.readStream.Position = (long)recordPosition; return(await LogRecord.ReadPreviousRecordAsync(this.readStream).ConfigureAwait(false)); }