Skip to content

Commit

Permalink
DbTable新增 Read(Byte[] buffer, Int32 offset = 0, Int32 count = -1)
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Nov 27, 2024
1 parent 4564a6e commit b10404a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions NewLife.Core/Data/DbTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,21 @@ public Boolean Read(IPacket pk)
return true;
}

/// <summary>读取</summary>
/// <param name="buffer"></param>
/// <param name="offset"></param>
/// <param name="count"></param>
/// <returns></returns>
public Boolean Read(Byte[] buffer, Int32 offset = 0, Int32 count = -1)
{
if (count < 0) count = buffer.Length - offset;

var ms = new MemoryStream(buffer, offset, count);
Read(ms);

return true;
}

/// <summary>从文件加载</summary>
/// <param name="file"></param>
/// <param name="compressed">是否压缩</param>
Expand Down

0 comments on commit b10404a

Please sign in to comment.