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