SegmentBuilder
class
Namespace: Orleans.Providers.Streams.Common
Utility class for encoding data into an ArraySegment.
public static class SegmentBuilderMethods
Append(ArraySegment<byte>, int, ReadOnlySpan<byte>)Appends aSystem.ReadOnlyMemoryof bytes to the end of the segmentAppend(ArraySegment<byte>, int, string)Appends a string to the end of the segmentCalculateAppendSize(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>, int)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>, int)Reads the next item in the segment as a string.
