• Version 1.15.2
Show / Hide Table of Contents

Class Group

FIX Repeating Group.

Inheritance
object
Group
Implements
IEnumerable<GroupInstance>
IEnumerable
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: OnixS.Fix
Assembly: OnixS.Fix.Engine.dll
Syntax
public class Group : IEnumerable<GroupInstance>, IEnumerable

Properties

EntryBeginningTag

Returns tag number which identifies the beginning of new entry.

Declaration
public int EntryBeginningTag { get; }
Property Value
Type Description
int

tag number which identifies the beginning of new entry.

GroupInfo

Declaration
public FieldInfo GroupInfo { get; }
Property Value
Type Description
FieldInfo

this[int]

Declaration
public virtual GroupInstance this[int index] { get; }
Parameters
Type Name Description
int index
Property Value
Type Description
GroupInstance

LeadingTag

Returns tag which identifies the number of repeating group entries.

Declaration
public int LeadingTag { get; }
Property Value
Type Description
int

tag which identifies the number of repeating group entries.

NumberOfInstances

Declaration
public int NumberOfInstances { get; set; }
Property Value
Type Description
int

Methods

AddEntry()

Adds an entry to the end of the group.

Declaration
public Group AddEntry()
Returns
Type Description
Group

This instance

CompareFieldValue(int, int, string)

Compares field value without memory allocation.

Declaration
public bool CompareFieldValue(int tag, int index, string value)
Parameters
Type Name Description
int tag

the tag number

int index

repeating group instance index, starts from 0

string value

value to compare

Returns
Type Description
bool
True
, if the values are equals, false otherwise

Contains(int, int)

Returns whether the field with the specified tag number is set.

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

field tag number

int index

Index of the repeating group instance, starts from 0

Returns
Type Description
bool
true
if the field is set,
false
if the field is not set
or is not defined for this message

Get(int, int)

Returns the field value as string.

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

tag number

int index

Index of the repeating group instance, starts from 0

Returns
Type Description
string

field value as string

Get(int, int, StringBuilder)

Writes the field value in the StringBuilder.

Declaration
public Group Get(int tag, int index, StringBuilder value)
Parameters
Type Name Description
int tag

Tag number

int index

Index of the repeating group instance, starts from 0

StringBuilder value
Returns
Type Description
Group

This instance

GetBytes(int, int)

Returns the field value as byte[].

Declaration
public byte[] GetBytes(int tag, int index)
Parameters
Type Name Description
int tag

tag number

int index

Index of the repeating group instance, starts from 0

Returns
Type Description
byte[]

field value as a byte array, null if it is not set

GetChar(int, int)

Returns the field value as character.

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

Tag number

int index

Index of the repeating group instance, starts from 0

Returns
Type Description
char

field value as character,

Character.MAX_VALUE
if it is not set
Exceptions
Type Condition
TagNotFoundException

If the field is absent

IncorrectFieldValueException

if the field value cannot be converted to a character

GetDecimal(int, int)

Returns the field value as decimal.

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

tag number

int index

Index of the repeating group instance, starts from 0

Returns
Type Description
decimal

field value as decimal,

null
if it is not set
Exceptions
Type Condition
IncorrectFieldValueException

if the value cannot be parsed to decimal

GetDouble(int, int)

Returns the field value as double. Warning. The double type shouldn't be used for precise values.

Declaration
public double GetDouble(int tag, int index)
Parameters
Type Name Description
int tag

field tag number

int index

Index of the repeating group instance, starts from 0

Returns
Type Description
double

field value as double

Exceptions
Type Condition
IncorrectFieldValueException

if the value cannot be parsed to double

GetEntry(int)

Returns the mentioned entry from the group.

Declaration
public GroupInstance GetEntry(int index)
Parameters
Type Name Description
int index

Index of the entry to be returned.

Returns
Type Description
GroupInstance

entry corresponding to the specified index.

GetEnumerator()

Gets an instances enumerator.

Declaration
public Group.GroupInstanceEnumerator GetEnumerator()
Returns
Type Description
Group.GroupInstanceEnumerator

An instances enumerator

GetFlag(int, int)

Returns the flag value.

Declaration
public bool GetFlag(int tag, int index)
Parameters
Type Name Description
int tag

Tag number

int index

Index of the repeating group instance, starts from 0

Returns
Type Description
bool

true if the field value is 'Y', false if the field value is 'N' or the field is absent

GetGroup(int, int)

Returns the nested repeating group.

Declaration
public Group GetGroup(int tag, int index)
Parameters
Type Name Description
int tag

tag number of the field that defines the number of instances in this repeating group (the NoXXX field)

int index

Index of the repeating group instance, starts from 0

Returns
Type Description
Group

nested repeating group

Exceptions
Type Condition
ParserException

The tag number does not belong to the group.

GetHighResolutionTimeSpan(int, int)

Returns field value as HighResolutionTimeSpan .

Declaration
public HighResolutionTimeSpan GetHighResolutionTimeSpan(int tag, int index)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

Returns
Type Description
HighResolutionTimeSpan

field value or null if it is not available

Exceptions
Type Condition
IncorrectFieldValueException

if the field value cannot be parsed to HighResolutionTimeSpan with specified TimestampFormat format

GetHighResolutionTimeSpan(int, int, out TimeSpanFormat)

Returns field value as HighResolutionTimeSpan and it's source format.

Declaration
public HighResolutionTimeSpan GetHighResolutionTimeSpan(int tag, int index, out TimeSpanFormat format)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

TimeSpanFormat format

Value format

Returns
Type Description
HighResolutionTimeSpan

field value or null if it is not available

Exceptions
Type Condition
IncorrectFieldValueException

if the field value cannot be parsed to HighResolutionTimeSpan with specified TimestampFormat format

GetHighResolutionTimestamp(int, int)

Returns field value as HighResolutionTimestamp .

Declaration
public HighResolutionTimestamp GetHighResolutionTimestamp(int tag, int index)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

Returns
Type Description
HighResolutionTimestamp

field value or null if it is not available

Exceptions
Type Condition
IncorrectFieldValueException

if the field value cannot be parsed to HighResolutionTimestamp with specified TimestampFormat format

GetHighResolutionTimestamp(int, int, out TimestampFormat)

Returns field value as HighResolutionTimestamp and it's source format.

Declaration
public HighResolutionTimestamp GetHighResolutionTimestamp(int tag, int index, out TimestampFormat format)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

TimestampFormat format

Value format

Returns
Type Description
HighResolutionTimestamp

field value or null if it is not available

Exceptions
Type Condition
IncorrectFieldValueException

if the field value cannot be parsed to HighResolutionTimestamp with specified TimestampFormat format

GetInteger(int, int)

Returns the field value as integer.

Declaration
public int GetInteger(int tag, int index)
Parameters
Type Name Description
int tag

tag number

int index

Index of the repeating group instance, starts from 0

Returns
Type Description
int

field value as integer

Exceptions
Type Condition
IncorrectFieldValueException

if the value cannot be parsed to int

GetLong(int, int)

Returns the field value as long. Whether the value is set or not can be checked using Contains(int, int).

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

tag number

int index

repeating group instance index, starts from 0

Returns
Type Description
long

field value as long,

Long.MAX_VALUE
if it is not set
Exceptions
Type Condition
IncorrectFieldValueException

if the value cannot be parsed to long

GetSpan(int, int)

Returns field value as a pointer to a byte array. Warning. Only read access to the returned array is allowed.

Declaration
public ReadOnlySpan<byte> GetSpan(int tag, int index)
Parameters
Type Name Description
int tag

tag number

int index

repeating group instance index, starts from 0

Returns
Type Description
ReadOnlySpan<byte>

value reference

Exceptions
Type Condition
TagNotDefinedForThisMessageTypeException

if field with the specified tag is not defined for this message

GetTimeSpan(int, int)

Returns field value as TimeSpan.

Declaration
public TimeSpan GetTimeSpan(int tag, int index)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

Returns
Type Description
TimeSpan

field value or null if it is not available

Exceptions
Type Condition
IncorrectFieldValueException

if the field value cannot be parsed to TimeSpan

GetTimestamp(int, int)

Returns field value as DateTime.

Declaration
public DateTime GetTimestamp(int tag, int index)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

Returns
Type Description
DateTime

field value or null if it is not available

Exceptions
Type Condition
IncorrectFieldValueException

if the field value cannot be parsed to DateTime

GetTimestamp(int, int, out TimestampFormat)

Returns field value as DateTime and it's source format.

Declaration
public DateTime GetTimestamp(int tag, int index, out TimestampFormat format)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

TimestampFormat format

Value format

Returns
Type Description
DateTime

field value or null if it is not available

Exceptions
Type Condition
IncorrectFieldValueException

if the field value cannot be parsed to DateTime

HasFlag(int, int)

Returns the flag value.

Declaration
public bool HasFlag(int tag, int index)
Parameters
Type Name Description
int tag

Tag number

int index

repeating group instance index, starts from 0

Returns
Type Description
bool

whether field value is equal to "Y" or "y"

HasGroup(int, int)

Returns whether repeating group belongs to the fix block and actually exists.

Please note that the checking excludes nested repeating groups.

Declaration
public bool HasGroup(int tag, int index)
Parameters
Type Name Description
int tag

tag number of the field that defines the number of instances in this repeating group (the NoXXX field)

int index

Index of the repeating group instance, starts from 0

Returns
Type Description
bool
true
in case repeating group belongs to the fix block and actually exists,
false
otherwise

Remove(int, int)

Removes the field.

Declaration
public bool Remove(int tag, int index)
Parameters
Type Name Description
int tag

tag number

int index

Index of the repeating group instance, starts from 0

Returns
Type Description
bool

true if the field was found and removed, otherwise false

RemoveEntries()

Removes all the entries from the group including leading tag from parent.

Declaration
public Group RemoveEntries()
Returns
Type Description
Group

This instance

RemoveEntry(int)

Removes the mentioned entry from the group.

Note: If the removed entry is the last entry of the group, the entire group will be removed from its parent.

Declaration
public Group RemoveEntry(int index)
Parameters
Type Name Description
int index

Index of the entry to be removed.

Returns
Type Description
Group

This instance

Set(int, int, ByteBuffer)

Sets the field value.

Declaration
public Group Set(int tag, int index, ByteBuffer buffer)
Parameters
Type Name Description
int tag

tag number

int index

index of the repeating group instance, starts from 0

ByteBuffer buffer

field value

Returns
Type Description
Group

This instance

Exceptions
Type Condition
TagNotDefinedForThisMessageTypeException

if field with the specified tag is not defined for this message

NullReferenceException

if (buffer == null)

Set(int, int, HighResolutionTimeSpan)

Sets the field value as HighResolutionTimeSpan formatting it to timestamp.

Declaration
public Group Set(int tag, int index, HighResolutionTimeSpan value)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

HighResolutionTimeSpan value

field value

Returns
Type Description
Group

This instance

Exceptions
Type Condition
ArgumentException

if (index < 0)

NullReferenceException

if (value == null)

TagNotDefinedForThisMessageTypeException

if field with the specified tag is not defined for this message and unknown fields are disabled

Set(int, int, HighResolutionTimeSpan, TimeSpanFormat)

Sets the field value as HighResolutionTimeSpan formatting it to timestamp.

Declaration
public Group Set(int tag, int index, HighResolutionTimeSpan value, TimeSpanFormat format)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

HighResolutionTimeSpan value

field value

TimeSpanFormat format

value format

Returns
Type Description
Group

This instance

Exceptions
Type Condition
ArgumentException

if (index < 0)

NullReferenceException

if (value == null)

TagNotDefinedForThisMessageTypeException

if field with the specified tag is not defined for this message and unknown fields are disabled

Set(int, int, HighResolutionTimestamp)

Sets the field value as HighResolutionTimestamp formatting it to timestamp.

Declaration
public Group Set(int tag, int index, HighResolutionTimestamp value)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

HighResolutionTimestamp value

field value

Returns
Type Description
Group

This instance

Exceptions
Type Condition
ArgumentException

if (index < 0)

NullReferenceException

if (value == null)

TagNotDefinedForThisMessageTypeException

if field with the specified tag is not defined for this message and unknown fields are disabled

Set(int, int, HighResolutionTimestamp, TimestampFormat)

Sets the field value as HighResolutionTimestamp formatting it to timestamp.

Declaration
public Group Set(int tag, int index, HighResolutionTimestamp value, TimestampFormat format)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

HighResolutionTimestamp value

field value

TimestampFormat format

value format

Returns
Type Description
Group

This instance

Exceptions
Type Condition
ArgumentException

if (index < 0)

NullReferenceException

if (value == null)

TagNotDefinedForThisMessageTypeException

if field with the specified tag is not defined for this message and unknown fields are disabled

Set(int, int, bool)

Sets the value as a flag: 'Y' or 'N'.

Declaration
public Group Set(int tag, int index, bool value)
Parameters
Type Name Description
int tag

Tag number

int index

Index of the repeating group instance, starts from 0

bool value

true for 'Y', false for 'N'

Returns
Type Description
Group

This instance

Exceptions
Type Condition
TagNotDefinedForThisMessageTypeException

if field with the given tag is not defined for this message and unknown fields are disabled

Set(int, int, byte[], int)

Sets the field buffer.

Declaration
public Group Set(int tag, int index, byte[] buffer, int valueLength)
Parameters
Type Name Description
int tag

tag number

int index

repeating group instance index, starts from 0

byte[] buffer

byte buffer

int valueLength

value length in the buffer

Returns
Type Description
Group

This instance

Exceptions
Type Condition
TagNotDefinedForThisMessageTypeException

if field with the specified tag is not defined for this message

NullReferenceException

if (buffer == null)

ArgumentException

if (index < 0) or (valueLength > value.valueLength) or (valueLength < 0)

Set(int, int, byte[], int, int)

Sets the field value.

Declaration
public Group Set(int tag, int index, byte[] buffer, int valueOffset, int valueLength)
Parameters
Type Name Description
int tag

tag number

int index

repeating group instance index, starts from 0

byte[] buffer

byte buffer

int valueOffset

value offset in the buffer

int valueLength

value length in the buffer

Returns
Type Description
Group

This instance

Exceptions
Type Condition
TagNotDefinedForThisMessageTypeException

if field with the specified tag is not defined for this message

NullReferenceException

if (buffer == null)

ArgumentException

if (index < 0) or (valueOffset < 0) or (valueOffset + valueLength > value.valueLength) or (valueLength < 0)

Set(int, int, char)

Sets the field value as character.

Declaration
public Group Set(int tag, int index, char value)
Parameters
Type Name Description
int tag

Tag number

int index

Index of the repeating group instance, starts from 0

char value

field value

Returns
Type Description
Group

This instance

Exceptions
Type Condition
TagNotDefinedForThisMessageTypeException

if field with the specified tag is not defined for this message and unknown fields are disabled

Set(int, int, DateTime)

Sets the field value as DateTime formatting it to timestamp.

Declaration
public Group Set(int tag, int index, DateTime value)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

DateTime value

field value

Returns
Type Description
Group

This instance

Exceptions
Type Condition
ArgumentException

if (index < 0)

NullReferenceException

if (value == null)

TagNotDefinedForThisMessageTypeException

if field with the specified tag is not defined for this message and unknown fields are disabled

Set(int, int, DateTime, TimestampFormat)

Sets the field value as DateTime formatting it to timestamp.

Declaration
public Group Set(int tag, int index, DateTime value, TimestampFormat format)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

DateTime value

field value

TimestampFormat format

value format

Returns
Type Description
Group

This instance

Exceptions
Type Condition
ArgumentException

if (index < 0)

NullReferenceException

if (value == null)

TagNotDefinedForThisMessageTypeException

if field with the specified tag is not defined for this message and unknown fields are disabled

Set(int, int, decimal)

Sets the field value as decimal .

Declaration
public Group Set(int tag, int index, decimal value)
Parameters
Type Name Description
int tag

Tag number

int index

Index of the repeating group instance, starts from 0

decimal value

Field value

Returns
Type Description
Group

This instance

Exceptions
Type Condition
TagNotDefinedForThisMessageTypeException

if field with the given tag is not defined for this message and unknown fields are disabled

Set(int, int, decimal, int)

Sets the field value as decimal with the given number of decimal places.

Declaration
public Group Set(int tag, int index, decimal value, int precision)
Parameters
Type Name Description
int tag

Tag number

int index

Index of the repeating group instance, starts from 0

decimal value

Field value

int precision

The desired number of decimal places

Returns
Type Description
Group

This instance

Exceptions
Type Condition
TagNotDefinedForThisMessageTypeException

if field with the given tag is not defined for this message and unknown fields are disabled

Set(int, int, double)

Sets the double field value. Warning. The double type shouldn't be used for precise values.

Declaration
public Group Set(int tag, int index, double value)
Parameters
Type Name Description
int tag

field tag number

int index

Index of the repeating group instance, starts from 0

double value

field value

Returns
Type Description
Group

This instance

Exceptions
Type Condition
TagNotDefinedForThisMessageTypeException

if field with the specified tag is not defined for this message

ArgumentException

if (index < 0)

Set(int, int, double, int)

Sets the field value as double with the given number of decimal places.

Note: The number will be rounded towards nearest neighbor unless both neighbors are equidistant, in which case round up.

Declaration
public Group Set(int tag, int index, double value, int precision)
Parameters
Type Name Description
int tag

Tag number

int index

Index of the repeating group instance, starts from 0

double value

Field value

int precision

The desired number of decimal places

Returns
Type Description
Group

This instance

Exceptions
Type Condition
TagNotDefinedForThisMessageTypeException

if field with the given tag is not defined for this message and unknown fields are disabled

Set(int, int, int)

Sets the field value as integer.

Declaration
public Group Set(int tag, int index, int value)
Parameters
Type Name Description
int tag

tag number

int index

Index of the repeating group instance, starts from 0

int value

field value

Returns
Type Description
Group

This instance

Exceptions
Type Condition
TagNotDefinedForThisMessageTypeException

if field with the specified tag is not defined for this message

Set(int, int, long)

Sets the long field value.

Declaration
public Group Set(int tag, int index, long value)
Parameters
Type Name Description
int tag

tag number

int index

Index of the repeating group instance, starts from 0

long value

field value

Returns
Type Description
Group

This instance

Exceptions
Type Condition
TagNotDefinedForThisMessageTypeException

if field with the specified tag is not defined for this message

Set(int, int, ReadOnlySpan<byte>)

Sets the field value.

Declaration
public Group Set(int tag, int index, ReadOnlySpan<byte> value)
Parameters
Type Name Description
int tag

tag number

int index

repeating group instance index, starts from 0

ReadOnlySpan<byte> value

field value

Returns
Type Description
Group

This instance

Exceptions
Type Condition
TagNotDefinedForThisMessageTypeException

if field with the specified tag is not defined for this message

ArgumentException

if ! valuePtr.isSet()

Set(int, int, string)

Sets the field value as string.

Declaration
public Group Set(int tag, int index, string value)
Parameters
Type Name Description
int tag

tag number

int index

Index of the repeating group instance, starts from 0

string value

field value

Returns
Type Description
Group

This instance

Exceptions
Type Condition
TagNotDefinedForThisMessageTypeException

if field with the specified tag is not defined for this message

NullReferenceException

if (value == null)

Set(int, int, StringBuilder)

Sets the field value as string.

Declaration
public Group Set(int tag, int index, StringBuilder value)
Parameters
Type Name Description
int tag

tag number

int index

Index of the repeating group instance, starts from 0

StringBuilder value

field value

Returns
Type Description
Group

This instance

Exceptions
Type Condition
TagNotDefinedForThisMessageTypeException

if field with the specified tag is not defined for this message

NullReferenceException

if (value == null)

Set(int, int, TimeSpan)

Sets the field value as TimeSpan formatting it to timestamp.

Declaration
public Group Set(int tag, int index, TimeSpan value)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

TimeSpan value

field value

Returns
Type Description
Group

This instance

Exceptions
Type Condition
ArgumentException

if (index < 0)

NullReferenceException

if (value == null)

TagNotDefinedForThisMessageTypeException

if field with the specified tag is not defined for this message and unknown fields are disabled

Set(int, int, TimeSpan, TimeSpanFormat)

Sets the field value as TimeSpan formatting it to timestamp.

Declaration
public Group Set(int tag, int index, TimeSpan value, TimeSpanFormat format)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

TimeSpan value

field value

TimeSpanFormat format

value format

Returns
Type Description
Group

This instance

Exceptions
Type Condition
ArgumentException

if (index < 0)

NullReferenceException

if (value == null)

TagNotDefinedForThisMessageTypeException

if field with the specified tag is not defined for this message and unknown fields are disabled

SetFlag(int, int, bool)

Sets the flag tag value - "Y" or "N".

Declaration
public Group SetFlag(int tag, int index, bool value)
Parameters
Type Name Description
int tag

the tag number

int index

repeating group instance index, starts from 0

bool value
true
for "Y",
false
for "N"
Returns
Type Description
Group

This instance

Exceptions
Type Condition
TagNotDefinedForThisMessageTypeException

if field with the specified tag is not defined for this message and unknown fields are disabled

SetGroup(int, int, int)

Creates a new repeating group or changes the number of instances in the existing repeating group.

Declaration
public Group SetGroup(int numberOfInstancesTag, int index, int numberOfInstances)
Parameters
Type Name Description
int numberOfInstancesTag

tag number of the field that defines the number of instances in this repeating group (the NoXXX field)

int index

index of the repeating group instance, starts from 0

int numberOfInstances

number of instances in the repeating group

Returns
Type Description
Group

repeating group

Exceptions
Type Condition
TagNotDefinedForThisMessageTypeException

if field with the specified tag is not defined for this message

ToString()

Returns string representation of the group.

Declaration
public override string ToString()
Returns
Type Description
string

FIX group as string

Overrides
object.ToString()

ToString(FixStringFormat)

Returns string representation of the group using specified format.

Declaration
public string ToString(FixStringFormat format)
Parameters
Type Name Description
FixStringFormat format

format to use

Returns
Type Description
string

FIX group as string

Exceptions
Type Condition
NullReferenceException

if (null == format)

ToString(char)

Returns string representation of the group using specified delimiter.

Declaration
public string ToString(char delimiter)
Parameters
Type Name Description
char delimiter

delimiter to use

Returns
Type Description
string

FIX group as string

ToString(char, FixStringFormat)

Returns string representation of the group using specified delimiter and format.

Declaration
public string ToString(char delimiter, FixStringFormat format)
Parameters
Type Name Description
char delimiter

delimiter to use

FixStringFormat format

format to use

Returns
Type Description
string

FIX group as string

Exceptions
Type Condition
NullReferenceException

if (null == format)

TryGet(int, int, out string)

Returns the field value as string. A return value indicates whether the operation succeeded.

Declaration
public bool TryGet(int tag, int index, out string result)
Parameters
Type Name Description
int tag

tag number

int index

Index of the repeating group instance, starts from 0

string result

Contains the string value of field, if the conversion succeeded, or null if field by given tag is not exists.

Returns
Type Description
bool

true if the tag exists, otherwise - false

TryGet(int, int, StringBuilder)

Returns the field value as string. A return value indicates whether the operation succeeded.

Declaration
public bool TryGet(int tag, int index, StringBuilder result)
Parameters
Type Name Description
int tag

tag number

int index

Index of the repeating group instance, starts from 0

StringBuilder result

Contains the string value of field, if the conversion succeeded, or null if field by given tag is not exists.

Returns
Type Description
bool

true if the tag exists, otherwise - false

TryGetBytes(int, int, out byte[])

Returns the field value as byte[]. A return value indicates whether the operation succeeded.

Declaration
public bool TryGetBytes(int tag, int index, out byte[] result)
Parameters
Type Name Description
int tag

Tag number

int index

Index of the repeating group instance, starts from 0

byte[] result

Field value

Returns
Type Description
bool

true if the field value was converted, otherwise - false

TryGetChar(int, int, out char)

Returns the field value as character. A return value indicates whether the operation succeeded.

Declaration
public bool TryGetChar(int tag, int index, out char result)
Parameters
Type Name Description
int tag

Tag number

int index

Index of the repeating group instance, starts from 0

char result

Field value as a character

Returns
Type Description
bool

true if the field value was converted, otherwise - false

TryGetDecimal(int, int, out decimal)

Returns the field value as decimal. A return value indicates whether the operation succeeded.

Declaration
public bool TryGetDecimal(int tag, int index, out decimal result)
Parameters
Type Name Description
int tag

Tag number

int index

index of the repeating group instance, starts from 0

decimal result

Contains the decimal number equivalent to the field value, if the conversion succeeded, or zero if the conversion failed.

Returns
Type Description
bool

true if the field value was converted, otherwise - false

TryGetDouble(int, int, out double)

Converts the field value to its double equivalent. A return value indicates whether the operation succeeded.

Note: According to the FIX Protocol float format the value should not contain the exponent ('e' or 'E') symbol.

Note: The double type should not be used for precise values.

Declaration
public bool TryGetDouble(int tag, int index, out double result)
Parameters
Type Name Description
int tag

Tag number

int index

Index of the repeating group instance, starts from 0

double result

Contains the double number equivalent to the field value, if the conversion succeeded, or zero if the conversion failed. The conversion fails if the field value is absent, is not of the correct format, or represents a number less than MinValue or greater than MaxValue. This parameter is passed uninitialized.

Returns
Type Description
bool

true if the field value was converted, otherwise - false

TryGetFlag(int, int, out bool)

Returns the field value as bool . A return value indicates whether the operation succeeded.

Declaration
public bool TryGetFlag(int tag, int index, out bool result)
Parameters
Type Name Description
int tag

Tag number

int index

Index of the repeating group instance, starts from 0

bool result

Contains true if the field value is 'Y', false if the field value is 'N' or the field is absent

Returns
Type Description
bool

true if the field value was converted, otherwise - false

TryGetGroup(int, int, out Group)

Returns the repeating group. A return value indicates whether the operation succeeded.

Declaration
public bool TryGetGroup(int tag, int index, out Group result)
Parameters
Type Name Description
int tag

Tag number of the field that defines the number of instances in this repeating group (the NoXXX field)

int index

Index of the repeating group instance, starts from 0

Group result

Contains the repeating group instance, if the conversion succeeded. The conversion fails if the field value is absent or is not of the correct format. This parameter is passed uninitialized.

Returns
Type Description
bool

true if the repeating group was found, otherwise - false

TryGetHighResolutionTimeSpan(int, int, out HighResolutionTimeSpan)

Returns field value as HighResolutionTimeSpan .

Declaration
public bool TryGetHighResolutionTimeSpan(int tag, int index, out HighResolutionTimeSpan result)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

HighResolutionTimeSpan result

field value

Returns
Type Description
bool

whether value available

Exceptions
Type Condition
NullReferenceException

if ("value == null")

IncorrectFieldValueException

if the field value cannot be parsed to TimeSpan

TryGetHighResolutionTimeSpan(int, int, out HighResolutionTimeSpan, out TimeSpanFormat)

Returns field value as HighResolutionTimeSpan and it's source format.

Declaration
public bool TryGetHighResolutionTimeSpan(int tag, int index, out HighResolutionTimeSpan result, out TimeSpanFormat format)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

HighResolutionTimeSpan result

field value

TimeSpanFormat format

Value format

Returns
Type Description
bool

whether value available

Exceptions
Type Condition
NullReferenceException

if ("value == null")

IncorrectFieldValueException

if the field value cannot be parsed to TimeSpan

TryGetHighResolutionTimestamp(int, int, out HighResolutionTimestamp)

Returns field value as HighResolutionTimestamp .

Declaration
public bool TryGetHighResolutionTimestamp(int tag, int index, out HighResolutionTimestamp result)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

HighResolutionTimestamp result

field value

Returns
Type Description
bool

whether value available

Exceptions
Type Condition
NullReferenceException

if ("value == null")

IncorrectFieldValueException

if the field value cannot be parsed to Calendar

TryGetHighResolutionTimestamp(int, int, out HighResolutionTimestamp, out TimestampFormat)

Returns field value as HighResolutionTimestamp and it's source format.

Declaration
public bool TryGetHighResolutionTimestamp(int tag, int index, out HighResolutionTimestamp result, out TimestampFormat format)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

HighResolutionTimestamp result

field value

TimestampFormat format

Value format

Returns
Type Description
bool

whether value available

Exceptions
Type Condition
NullReferenceException

if ("value == null")

IncorrectFieldValueException

if the field value cannot be parsed to Calendar

TryGetInteger(int, int, out int)

Converts the field value to its 32-bit signed integer equivalent. A return value indicates whether the operation succeeded.

Declaration
public bool TryGetInteger(int tag, int index, out int result)
Parameters
Type Name Description
int tag

Tag number

int index

Index of the repeating group instance, starts from 0

int result

The 32-bit signed integer number equivalent to the field value, if the conversion succeeded, or zero if the conversion failed. The conversion fails if the field value is absent, is not of the correct format, or represents a number less than MinValue or greater than MaxValue. This parameter is passed uninitialized.

Returns
Type Description
bool

true if the field value was converted, otherwise - false

Exceptions
Type Condition
IncorrectFieldValueException

if the value cannot be parsed to an Integer

TryGetLong(int, int, out long)

Converts the field value to its 64-bit signed integer equivalent. A return value indicates whether the operation succeeded.

Declaration
public bool TryGetLong(int tag, int index, out long result)
Parameters
Type Name Description
int tag

Tag number

int index

Index of the repeating group instance, starts from 0

long result

The 64-bit signed integer number equivalent to the field value, if the conversion succeeded, or zero if the conversion failed. The conversion fails if the field value is absent, is not of the correct format, or represents a number less than MinValue or greater than MaxValue. This parameter is passed uninitialized.

Returns
Type Description
bool

true if the field value was converted, otherwise - false

TryGetSpan(int, int, out ReadOnlySpan<byte>)

Returns the field value as ReadOnlySpan<T>. A return value indicates whether the operation succeeded. This is the most efficient way to access a field value. Warning. Only read access to the returned array is allowed.

Declaration
public bool TryGetSpan(int tag, int index, out ReadOnlySpan<byte> result)
Parameters
Type Name Description
int tag

tag number

int index

repeating group instance index, starts from 0

ReadOnlySpan<byte> result

reference to pass value

Returns
Type Description
bool

whether value exists or not

TryGetTimeSpan(int, int, out TimeSpan)

Returns field value as TimeSpan .

Declaration
public bool TryGetTimeSpan(int tag, int index, out TimeSpan result)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

TimeSpan result

field value

Returns
Type Description
bool

whether value available

Exceptions
Type Condition
NullReferenceException

if ("value == null")

IncorrectFieldValueException

if the field value cannot be parsed to TimeSpan

TryGetTimeSpan(int, int, out TimeSpan, out TimeSpanFormat)

Returns field value as TimeSpan and it's source format.

Declaration
public bool TryGetTimeSpan(int tag, int index, out TimeSpan result, out TimeSpanFormat format)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

TimeSpan result

field value

TimeSpanFormat format

Value format

Returns
Type Description
bool

whether value available

Exceptions
Type Condition
NullReferenceException

if ("value == null")

IncorrectFieldValueException

if the field value cannot be parsed to TimeSpan

TryGetTimestamp(int, int, out DateTime)

Returns field value as DateTime .

Declaration
public bool TryGetTimestamp(int tag, int index, out DateTime result)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

DateTime result

field value

Returns
Type Description
bool

whether value available

Exceptions
Type Condition
NullReferenceException

if ("value == null")

IncorrectFieldValueException

if the field value cannot be parsed to Calendar

TryGetTimestamp(int, int, out DateTime, out TimestampFormat)

Returns field value as DateTime and it's source format.

Declaration
public bool TryGetTimestamp(int tag, int index, out DateTime result, out TimestampFormat format)
Parameters
Type Name Description
int tag

field tag

int index

repeating group instance index, starts from 0

DateTime result

field value

TimestampFormat format

Value format

Returns
Type Description
bool

whether value available

Exceptions
Type Condition
NullReferenceException

if ("value == null")

IncorrectFieldValueException

if the field value cannot be parsed to Calendar

Implements

IEnumerable<T>
IEnumerable
In this article
Back to top Copyright © Onix Solutions.
Generated by DocFX