Edit

Share via


SegmentBuilder Class

Definition

Utility class for encoding data into an ArraySegment.

public static class SegmentBuilder
type SegmentBuilder = class
Public Class SegmentBuilder
Inheritance
SegmentBuilder

Methods

Append(ArraySegment<Byte>, Int32, ArraySegment<Byte>)

Appends an array of bytes to the end of the segment

Append(ArraySegment<Byte>, Int32, Byte[])

Appends an array of bytes to the end of the segment

Append(ArraySegment<Byte>, Int32, ReadOnlyMemory<Byte>)

Appends a ReadOnlyMemory<T> of bytes to the end of the segment

Append(ArraySegment<Byte>, Int32, ReadOnlySpan<Byte>)

Appends a ReadOnlyMemory<T> of bytes to the end of the segment

Append(ArraySegment<Byte>, Int32, String)

Appends a string to the end of the segment

CalculateAppendSize(ArraySegment<Byte>)

Calculates how much space will be needed to append the provided bytes into the segment.

CalculateAppendSize(Byte[])

Calculates how much space will be needed to append the provided bytes into the segment.

CalculateAppendSize(ReadOnlyMemory<Byte>)

Calculates how much space will be needed to append the provided bytes into the segment.

CalculateAppendSize(ReadOnlySpan<Byte>)

Calculates how much space will be needed to append the provided bytes into the segment.

CalculateAppendSize(String)

Calculates how much space will be needed to append the provided string into the segment.

ReadNextBytes(ArraySegment<Byte>, Int32)

Reads the next item in the segment as a byte array. For performance, this is returned as a sub-segment of the original segment.

ReadNextString(ArraySegment<Byte>, Int32)

Reads the next item in the segment as a string.

Applies to