• Version 4.4.3
Show / Hide Table of Contents

Class ResizableMessage

The base class for resizable messages.

Inheritance
object
ResizableMessage
BaseMessage<THeader>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: OnixS.SimpleBinaryEncoding
Assembly: OnixS.SimpleBinaryEncoding.dll
Syntax
public abstract class ResizableMessage

Fields

buffer

The underlying memory region.

Declaration
protected MemoryPointer buffer
Field Value
Type Description
MemoryPointer

Properties

Buffer

Declaration
public Span<byte> Buffer { get; }
Property Value
Type Description
Span<byte>

The memory region.

MessageLength

Declaration
public abstract ushort MessageLength { get; }
Property Value
Type Description
ushort

The length of the entire message, including the binary header, in bytes.

Methods

Resize(Span<byte>, int, int)

Resizes the message and copies the required data.

Declaration
protected void Resize(Span<byte> regionToResize, int oldSize, int newSize)
Parameters
Type Name Description
Span<byte> regionToResize

The memory region to resize.

int oldSize

The old message size.

int newSize

The new message size.

Exceptions
Type Condition
BufferOverflowException

Thrown if the memory region does not have free space for a new repeating group.

Wrap(MemoryPointer, bool)

Wraps the message around the given memory region.

Declaration
public void Wrap(MemoryPointer buffer, bool encode = false)
Parameters
Type Name Description
MemoryPointer buffer

The memory region.

bool encode

If true sets header fields and resets optional fields.

Wrap(MemoryPointer, bool, bool)

Wraps the message around the given memory region.

Declaration
protected abstract void Wrap(MemoryPointer buffer, bool encode, bool resetGroups)
Parameters
Type Name Description
MemoryPointer buffer

The memory region.

bool encode

If true sets header fields and resets optional fields.

bool resetGroups

If true resets repeating group positions.

In this article
Back to top Copyright © Onix Solutions.
Generated by DocFX