Skip to content

ArcBufferPage Methods

A page of data.

Advance(int)

View source
public void Advance(int bytes)
Increases the number of bytes written to the page by the provided amount.

Parameters

bytesint
The number of bytes to increase the length of this page by.

AsArraySegment(int, int)

View source
public ArraySegment<byte> AsArraySegment(int offset, int length)
Returns an array segment pointing to the underlying array, starting from the provided offset, and having the provided length.

Parameters

offsetint
The offset into the array that the array segment starts from.
lengthint
The length of the array segment.

Returns

The array segment.

AsMemory(int)

View source
public Memory<byte> AsMemory(int offset)
Creates a new memory region over the portion of the target page beginning at a specified position.

Parameters

offsetint
The offset into the array to return memory from.

Returns

The memory region.

AsMemory(int, int)

View source
public Memory<byte> AsMemory(int offset, int length)
Creates a new memory region over the portion of the target page beginning at a specified position with a specified length.

Parameters

offsetint
The offset into the array that the memory region starts from.
lengthint
The length of the memory region.

Returns

The memory region.

AsSpan(int)

View source
public Span<byte> AsSpan(int offset)
Gets a span pointing to the underlying array, starting from the provided offset.

Parameters

offsetint
The offset.

Returns

The span.

AsSpan(int, int)

View source
public Span<byte> AsSpan(int offset, int length)
Gets a span pointing to the underlying array, starting from the provided offset.

Parameters

offsetint
The offset.
lengthint
The length.

Returns

The span.

Pin(int)

View source
public void Pin(int token)
Pins this page to prevent it from being returned to the page pool.

Parameters

tokenint
The token, which must match the page's ArcBufferPage for this operation to be allowed.

SetNext(ArcBufferPage, int)

View source
public void SetNext(ArcBufferPage next, int token)
Sets the next page in the sequence.

Parameters

nextArcBufferPage
The next page in the sequence.
tokenint
The token, which must match the page's ArcBufferPage for this operation to be allowed.

Unpin(int)

View source
public void Unpin(int token)
Unpins this page, allowing it to be returned to the page pool.

Parameters

tokenint
The token, which must match the page's ArcBufferPage for this operation to be allowed.