ValueByteBlock(Int32, FuncInt32, MemoryByte, ActionMemoryByte) 构造函数
命名空间: TouchSocket.Core程序集: TouchSocket.Core (在 TouchSocket.Core.dll 中) 版本:4.0.0-beta.143+5fcca7a4e70968794985dc3793adc50531308be6
public ValueByteBlock(
int capacity,
Func<int, Memory<byte>> onRent,
Action<Memory<byte>> onReturn
)
Public Sub New (
capacity As Integer,
onRent As Func(Of Integer, Memory(Of Byte)),
onReturn As Action(Of Memory(Of Byte))
)
new :
capacity : int *
onRent : Func<int, Memory<byte>> *
onReturn : Action<Memory<byte>> -> ValueByteBlock
参数
- capacity Int32
- 初始容量,最小为1024字节。
- onRent FuncInt32, MemoryByte
- 内存租赁委托。
- onReturn ActionMemoryByte
- 内存归还委托。