v9.6.2017.0808   重构正向工程,基于映射表查找数据库字段类型到实体类型的映射
大石头 authored at 2017-08-08 21:38:06
734.00 B
X
namespace NewLife.Queue.Storage
{
    public struct RecordWriteResult
    {
        public readonly bool Success;
        public readonly long Position;

        private RecordWriteResult(bool success, long position)
        {
            Success = success;
            Position = position;
        }

        public static RecordWriteResult NotEnoughSpace()
        {
            return new RecordWriteResult(false, -1);
        }
        public static RecordWriteResult Successful(long position)
        {
            return new RecordWriteResult(true, position);
        }

        public override string ToString()
        {
            return string.Format("[Success:{0}, Position:{1}]", Success, Position);
        }
    }
}