移除项目
老邱 authored at 2016-12-23 09:10:38
467.00 B
X
using NewLife.Queue.Storage;

namespace NewLife.Queue.Broker
{
    public static class Extensions
    {
        public static BufferLogRecord TryReadRecordBufferAt(this ChunkReader chunkReader, long position)
        {
            return chunkReader.TryReadAt(position, recordBuffer =>
            {
                var record = new BufferLogRecord();
                record.ReadFrom(recordBuffer);
                return record;
            });
        }
    }
}