【作为】的意思是,导出的数据内存实际上依旧是IByteBlock生命周期内的,不能脱离生命周期使用。
public static ArraySegment<byte> AsSegment<TByteBlock>(
this TByteBlock byteBlock,
int offset
)
where TByteBlock : IByteBlock
<ExtensionAttribute>
Public Shared Function AsSegment(Of TByteBlock As IByteBlock) (
byteBlock As TByteBlock,
offset As Integer
) As ArraySegment(Of Byte)
[<ExtensionAttribute>]
static member AsSegment :
byteBlock : 'TByteBlock *
offset : int -> ArraySegment<byte> when 'TByteBlock : IByteBlock