• Version 4.4.3
Show / Hide Table of Contents

Class BaseGroup

A base class for repeating groups.

Inheritance
object
BaseGroup
Implements
IGroup
IFieldSet
ICloneable
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: OnixS.SimpleBinaryEncoding
Assembly: OnixS.SimpleBinaryEncoding.dll
Syntax
public abstract class BaseGroup : IGroup, IFieldSet, ICloneable

Fields

buffer

The underlying memory region.

Declaration
protected MemoryPointer.UnmanagedPointer buffer
Field Value
Type Description
MemoryPointer.UnmanagedPointer

hasData

true if the repeating group has data, otherwise false.

Declaration
protected bool hasData
Field Value
Type Description
bool

index

The index of the current group entry.

Declaration
protected int index
Field Value
Type Description
int

Properties

Count

Declaration
public abstract int Count { get; }
Property Value
Type Description
int

The number of entries in the repeating group.

this[int]

Declaration
public string this[int tag] { get; set; }
Parameters
Type Name Description
int tag

The field tag.

Property Value
Type Description
string

The string field value.

Methods

Clone()

Creates a new object that is a copy of the current instance.

Declaration
public abstract object Clone()
Returns
Type Description
object

A new object that is a copy of this instance

Contains(int)

Returns true if the field is present in the field set and has a not null value, otherwise false.

Declaration
public abstract bool Contains(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
bool

true if the field is present in the field set and has a not null value, otherwise false.

Get(int)

Returns the string representation of the value.

Declaration
public abstract string Get(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
string

The string field value.

GetBoolean(int)

Returns the boolean field value.

Declaration
public abstract bool GetBoolean(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
bool

The boolean field value.

GetByte(int)

Returns the byte field value.

Declaration
public abstract byte GetByte(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
byte

The byte field value.

GetBytes(int)

Returns the raw field value.

Declaration
public abstract ReadOnlySpan<byte> GetBytes(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
ReadOnlySpan<byte>

The raw field value.

GetChar(int)

Returns the char field value.

Declaration
public abstract char GetChar(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
char

The char field value.

GetComposite(int)

Returns the composite field value.

Declaration
public abstract IComposite GetComposite(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
IComposite

The composite field value.

GetComposite<T>(int)

Returns the composite field value.

Declaration
public abstract T GetComposite<T>(int tag) where T : IComposite
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
T

The composite field value.

Type Parameters
Name Description
T

The preregistered type of the composite field.

GetDecimal(int)

Returns the decimal field value.

Declaration
public abstract decimal GetDecimal(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
decimal

The decimal field value.

GetEnum<T>(int)

Returns the enumeration field value.

Declaration
public abstract T GetEnum<T>(int tag) where T : unmanaged
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
T

The enumeration field value that is casted to the T enumeration type.

Type Parameters
Name Description
T

The enumeration type.

GetEnumerator()

Returns the repeating group entries enumerator.

Declaration
public IEnumerator<IFieldSet> GetEnumerator()
Returns
Type Description
IEnumerator<IFieldSet>

The repeating group entries enumerator.

GetGroup(int)

Returns the repeating group.

Declaration
public abstract IGroup GetGroup(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
IGroup

The repeating group.

GetInteger(int)

Returns the integer field value.

Declaration
public abstract int GetInteger(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
int

The integer field value.

GetLong(int)

Returns the long field value.

Declaration
public abstract long GetLong(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
long

The long field value.

GetMaturityMonthYear(int)

Returns the MaturityMonthYear field value.

Declaration
public abstract IMaturityMonthYear GetMaturityMonthYear(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
IMaturityMonthYear

The MaturityMonthYear field value.

GetShort(int)

Returns the short field value.

Declaration
public abstract short GetShort(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
short

The short field value.

GetSignedByte(int)

Returns the signed byte field value.

Declaration
public abstract sbyte GetSignedByte(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
sbyte

The signed byte field value.

GetString(int)

Returns the string field value.

Declaration
public abstract string GetString(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
string

The string field value.

GetTimestamp(int)

Returns the timestamp field value.

Declaration
public abstract ITimestamp GetTimestamp(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
ITimestamp

The timestamp field value.

GetUnsignedInteger(int)

Returns the unsigned integer field value.

Declaration
public abstract uint GetUnsignedInteger(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
uint

The unsigned integer field value.

GetUnsignedLong(int)

Returns the unsigned long field value.

Declaration
public abstract ulong GetUnsignedLong(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
ulong

The unsigned long field value.

GetUnsignedShort(int)

Returns the unsigned short field value.

Declaration
public abstract ushort GetUnsignedShort(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
ushort

The unsigned short field value.

GetVariableLengthField(int)

Returns the variable-length field value.

Declaration
public abstract IVariableLengthField GetVariableLengthField(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
IVariableLengthField

The variable-length field value.

MoveNext()

Advances the repeating group to the next entry.

Declaration
public abstract bool MoveNext()
Returns
Type Description
bool

true if the next entry exists, otherwise false.

Reset()

Resets the repeating group entry position.

Declaration
public abstract void Reset()

ResizeGroup(int, int)

Resizes the repeating group.

Declaration
protected void ResizeGroup(int oldSize, int newSize)
Parameters
Type Name Description
int oldSize

The old size.

int newSize

The new size.

Exceptions
Type Condition
BufferOverflowException

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

SetBoolean(int, bool)

Sets the boolean field value.

Declaration
public abstract IFieldSet SetBoolean(int tag, bool value)
Parameters
Type Name Description
int tag

The field tag.

bool value

The field value.

Returns
Type Description
IFieldSet

The reference to this instance.

SetByte(int, byte)

Sets the byte field value.

Declaration
public abstract IFieldSet SetByte(int tag, byte value)
Parameters
Type Name Description
int tag

The field tag.

byte value

The field value.

Returns
Type Description
IFieldSet

The reference to this instance.

SetByte(int, int)

Sets the byte field value.

Declaration
public abstract IFieldSet SetByte(int tag, int value)
Parameters
Type Name Description
int tag

The field tag.

int value

The field value.

Returns
Type Description
IFieldSet

The reference to this instance.

Remarks

The method will do a narrowing conversion.

SetBytes(int, ReadOnlySpan<byte>)

Sets the raw field value.

Declaration
public abstract IFieldSet SetBytes(int tag, ReadOnlySpan<byte> value)
Parameters
Type Name Description
int tag

The field tag.

ReadOnlySpan<byte> value

The raw value. Its length should be less or equal to the field length.

Returns
Type Description
IFieldSet

The reference to this instance.

SetChar(int, char)

Sets the char field value.

Declaration
public abstract IFieldSet SetChar(int tag, char value)
Parameters
Type Name Description
int tag

The field tag.

char value

The field value.

Returns
Type Description
IFieldSet

The reference to this instance.

SetDecimal(int, decimal)

Sets the decimal field value.

Declaration
public abstract IFieldSet SetDecimal(int tag, decimal value)
Parameters
Type Name Description
int tag

The field tag.

decimal value

The field value.

Returns
Type Description
IFieldSet

The reference to this instance.

SetEnum<T>(int, T)

Sets the enumeration field value.

Declaration
public abstract IFieldSet SetEnum<T>(int tag, T value) where T : unmanaged
Parameters
Type Name Description
int tag

The field tag.

T value

The field value.

Returns
Type Description
IFieldSet

The reference to this instance.

Type Parameters
Name Description
T

SetGroup(int, int)

Returns the repeating group and sets its count to the specified value.

Declaration
public abstract IGroup SetGroup(int tag, int count)
Parameters
Type Name Description
int tag

The field tag.

int count

The repeating group entries count.

Returns
Type Description
IGroup

The repeating group.

SetInteger(int, int)

Sets the integer field value.

Declaration
public abstract IFieldSet SetInteger(int tag, int value)
Parameters
Type Name Description
int tag

The field tag.

int value

The field value.

Returns
Type Description
IFieldSet

The reference to this instance.

SetLong(int, long)

Sets the long field value.

Declaration
public abstract IFieldSet SetLong(int tag, long value)
Parameters
Type Name Description
int tag

The field tag.

long value

The field value.

Returns
Type Description
IFieldSet

The reference to this instance.

SetShort(int, short)

Sets the short field value.

Declaration
public abstract IFieldSet SetShort(int tag, short value)
Parameters
Type Name Description
int tag

The field tag.

short value

The field value.

Returns
Type Description
IFieldSet

The reference to this instance.

SetShort(int, int)

Sets the short field value.

Declaration
public abstract IFieldSet SetShort(int tag, int value)
Parameters
Type Name Description
int tag

The field tag.

int value

The field value.

Returns
Type Description
IFieldSet

The reference to this instance.

Remarks

The method will do a narrowing conversion.

SetSignedByte(int, int)

Sets the signed byte field value.

Declaration
public abstract IFieldSet SetSignedByte(int tag, int value)
Parameters
Type Name Description
int tag

The field tag.

int value

The field value.

Returns
Type Description
IFieldSet

The reference to this instance.

Remarks

The method will do a narrowing conversion.

SetSignedByte(int, sbyte)

Sets the signed byte field value.

Declaration
public abstract IFieldSet SetSignedByte(int tag, sbyte value)
Parameters
Type Name Description
int tag

The field tag.

sbyte value

The field value.

Returns
Type Description
IFieldSet

The reference to this instance.

SetString(int, string)

Sets the string field value.

Declaration
public abstract IFieldSet SetString(int tag, string value)
Parameters
Type Name Description
int tag

The field tag.

string value

The field value.

Returns
Type Description
IFieldSet

The reference to this instance.

SetToNull(int)

Sets the optional value to null.

Declaration
public abstract IFieldSet SetToNull(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
IFieldSet

The reference to this instance.

SetUnsignedInteger(int, uint)

Sets the unsigned integer field value.

Declaration
public abstract IFieldSet SetUnsignedInteger(int tag, uint value)
Parameters
Type Name Description
int tag

The field tag.

uint value

The field value.

Returns
Type Description
IFieldSet

The reference to this instance.

SetUnsignedLong(int, ulong)

Sets the unsigned long field value.

Declaration
public abstract IFieldSet SetUnsignedLong(int tag, ulong value)
Parameters
Type Name Description
int tag

The field tag.

ulong value

The field value.

Returns
Type Description
IFieldSet

The reference to this instance.

SetUnsignedShort(int, int)

Sets the unsigned short field value.

Declaration
public abstract IFieldSet SetUnsignedShort(int tag, int value)
Parameters
Type Name Description
int tag

The field tag.

int value

The field value.

Returns
Type Description
IFieldSet

The reference to this instance.

Remarks

The method will do a narrowing conversion.

SetUnsignedShort(int, ushort)

Sets the unsigned short field value.

Declaration
public abstract IFieldSet SetUnsignedShort(int tag, ushort value)
Parameters
Type Name Description
int tag

The field tag.

ushort value

The field value.

Returns
Type Description
IFieldSet

The reference to this instance.

ToFixString()

Returns the FIX Protocol message style string.

Declaration
public abstract string ToFixString()
Returns
Type Description
string

The FIX Protocol message style string.

ToString()

Returns a string that represents the current object.

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents the current object

Overrides
object.ToString()

ToString(char)

Returns the text representation.

Declaration
public abstract string ToString(char separator)
Parameters
Type Name Description
char separator

The fields separator.

Returns
Type Description
string

The text representation

TryGetByte(int)

Returns the optional byte field value.

Declaration
public abstract byte? TryGetByte(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
byte?

The nullable byte field value.

TryGetChar(int)

Returns the optional char field value.

Declaration
public abstract char? TryGetChar(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
char?

The nullable char field value.

TryGetDecimal(int)

Returns an optional decimal field value.

Declaration
public abstract decimal? TryGetDecimal(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
decimal?

The nullable decimal field value.

TryGetInteger(int)

Returns the optional integer field value.

Declaration
public abstract int? TryGetInteger(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
int?

The nullable integer field value.

TryGetLong(int)

Returns the optional long field value.

Declaration
public abstract long? TryGetLong(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
long?

The nullable long field value.

TryGetShort(int)

Returns the optional short field value.

Declaration
public abstract short? TryGetShort(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
short?

The nullable short field value.

TryGetSignedByte(int)

Returns the optional signed byte field value.

Declaration
public abstract sbyte? TryGetSignedByte(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
sbyte?

The nullable signed byte field value.

TryGetUnsignedInteger(int)

Returns the optional unsigned integer field value.

Declaration
public abstract uint? TryGetUnsignedInteger(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
uint?

The nullable unsigned integer field value.

TryGetUnsignedLong(int)

Returns the optional unsigned long field value.

Declaration
public abstract ulong? TryGetUnsignedLong(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
ulong?

The nullable unsigned long field value.

TryGetUnsignedShort(int)

Returns the optional unsigned short field value.

Declaration
public abstract ushort? TryGetUnsignedShort(int tag)
Parameters
Type Name Description
int tag

The field tag.

Returns
Type Description
ushort?

The nullable unsigned short field value.

Wrap(UnmanagedPointer, bool, bool)

Wraps around the given memory region.

Declaration
public abstract void Wrap(MemoryPointer.UnmanagedPointer buffer, bool encode = false, bool reset = true)
Parameters
Type Name Description
MemoryPointer.UnmanagedPointer buffer

The memory region.

bool encode

If true sets header fields and resets optional fields.

bool reset

If true resets the repeating group entry position.

Implements

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