• Version 1.15.2
Show / Hide Table of Contents

Interface IFieldSet

Collection of Fields.

Inherited Members
IEnumerable<Field>.GetEnumerator()
Namespace: OnixS.Fix
Assembly: OnixS.Fix.Engine.dll
Syntax
public interface IFieldSet : IEnumerable<Field>, IEnumerable

Properties

FieldCount

Returns the number of tag/value pairs excluding nested repeating groups.

Declaration
int FieldCount { get; }
Property Value
Type Description
int

The number of tag/value pairs excluding nested repeating groups

this[int]

Returns the field value as string.

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

Tag number

Property Value
Type Description
string

Field value as string, null if it is not set

NumberOfGroups

Returns the number of repeating groups defined on the current level excluding nested repeating groups.

Declaration
int NumberOfGroups { get; }
Property Value
Type Description
int

Number of repeating groups defined on the current level excluding nested repeating groups

Methods

CompareFieldValue(int, string)

Returns true if the given tag is present in the FieldSet instance and its value is equal to the given string value, otherwise it returns false. The method can help to write GC-free code.

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

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

string value

String value to compare

Returns
Type Description
bool

True if the given tag is present in the FieldSet instance and its value is equal to the given string value

Contains(int)

Checks the field presence.

Note: the checking excludes nested repeating groups

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

Tag number

Returns
Type Description
bool

true if the field is set, false if the field is not set or is not defined for this message

Contains(int, bool)

Checks the field presence.

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

Tag number

bool nested

true for checking nested repeating groups recursively, otherwise - false

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)

Returns the field value as string.

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

Tag number

Returns
Type Description
string

Field value as string, null if it is not set

Get(int, StringBuilder)

Returns the field value as string.

Declaration
void Get(int tag, StringBuilder result)
Parameters
Type Name Description
int tag

Tag number

StringBuilder result

Field value

GetBytes(int)

Returns the field value as byte[].

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

Tag number

Returns
Type Description
byte[]

Field value as byte[]

Exceptions
Type Condition
TagNotFoundException

If the field is absent

GetChar(int)

Returns the field value as a character.

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

Tag number

Returns
Type Description
char

Field value as a character

Exceptions
Type Condition
TagNotFoundException

If the field is absent

IncorrectFieldValueException

if the field value cannot be converted to a character

GetDecimal(int)

Returns the field value as decimal.

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

Tag number

Returns
Type Description
decimal

Field value as decimal

Exceptions
Type Condition
TagNotFoundException

If the field is absent

IncorrectFieldValueException

if the value cannot be converted to decimal

GetDouble(int)

Returns the field value as double.

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
double GetDouble(int tag)
Parameters
Type Name Description
int tag

Tag number

Returns
Type Description
double

Field value as double

Exceptions
Type Condition
TagNotFoundException

If the field is absent

IncorrectFieldValueException

if the field value cannot be converted to double

GetFields()

Returns message fields.

Declaration
Field[] GetFields()
Returns
Type Description
Field[]

Message fields

GetFlag(int)

Returns the flag value.

Declaration
bool GetFlag(int tag)
Parameters
Type Name Description
int tag

Tag number

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)

Returns the repeating group.

Declaration
Group GetGroup(int tag)
Parameters
Type Name Description
int tag

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

Returns
Type Description
Group

Nested repeating group

Exceptions
Type Condition
ParserException

the tag number does not identify a repeating group

GetGroupsEnumerator()

Returns an iterator over groups of the current level excludes nested repeating groups.

Declaration
IEnumerator<Group> GetGroupsEnumerator()
Returns
Type Description
IEnumerator<Group>

Iterator over groups of the current level excludes nested repeating groups

GetHighResolutionTimeSpan(int)

Returns the field value as TimeSpan.

Declaration
HighResolutionTimeSpan GetHighResolutionTimeSpan(int tag)
Parameters
Type Name Description
int tag

Tag number

Returns
Type Description
HighResolutionTimeSpan

Field value as HighResolutionTimeSpan

Exceptions
Type Condition
TagNotFoundException

If the field is absent

IncorrectFieldValueException

if the field value cannot be parsed to HighResolutionTimeSpan using either HH:MM:SS (whole seconds) or HH:MM:SS.sss (milliseconds) or HH:MM:SS.sssssss (microseconds) or HH:MM:SS.ssssssssss (nanoseconds) or HH:MM:SS.sssssssssssss (picoseconds) format

GetHighResolutionTimeSpan(int, out TimeSpanFormat)

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

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

Tag number

TimeSpanFormat format

Value format

Returns
Type Description
HighResolutionTimeSpan

Field value as HighResolutionTimeSpan

Exceptions
Type Condition
TagNotFoundException

If the field is absent

IncorrectFieldValueException

if the field value cannot be parsed to HighResolutionTimeSpan using either HH:MM:SS (whole seconds) or HH:MM:SS.sss (milliseconds) or HH:MM:SS.sssssss (microseconds) or HH:MM:SS.ssssssssss (nanoseconds) or HH:MM:SS.sssssssssssss (picoseconds) format

GetHighResolutionTimestamp(int)

Returns the field value as HighResolutionTimestamp.

Declaration
HighResolutionTimestamp GetHighResolutionTimestamp(int tag)
Parameters
Type Name Description
int tag

Tag number

Returns
Type Description
HighResolutionTimestamp

Field value as HighResolutionTimestamp

Exceptions
Type Condition
TagNotFoundException

If the field is absent

IncorrectFieldValueException

if the field value cannot be parsed to HighResolutionTimestamp using either YYYYMMDD-HH:MM:SS (whole seconds) or YYYYMMDD-HH:MM:SS.sss (milliseconds) or YYYYMMDD-HH:MM:SS.sssssss (microseconds) or YYYYMMDD-HH:MM:SS.ssssssssss (nanoseconds) or YYYYMMDD-HH:MM:SS.sssssssssssss (picoseconds) format

GetHighResolutionTimestamp(int, out TimestampFormat)

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

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

Tag number

TimestampFormat format

Value format

Returns
Type Description
HighResolutionTimestamp

Field value as HighResolutionTimestamp

Exceptions
Type Condition
TagNotFoundException

If the field is absent

IncorrectFieldValueException

if the field value cannot be parsed to HighResolutionTimestamp using either YYYYMMDD-HH:MM:SS (whole seconds) or YYYYMMDD-HH:MM:SS.sss (milliseconds) or YYYYMMDD-HH:MM:SS.sssssss (microseconds) or YYYYMMDD-HH:MM:SS.ssssssssss (nanoseconds) or YYYYMMDD-HH:MM:SS.sssssssssssss (picoseconds) format

GetInteger(int)

Returns the field value as int.

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

Tag number

Returns
Type Description
int

Field value as int

Exceptions
Type Condition
TagNotFoundException

If the field is absent

IncorrectFieldValueException

if the field value cannot be converted to int

GetLong(int)

Returns the field value as long.

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

Tag number

Returns
Type Description
long

Field value as long

Exceptions
Type Condition
TagNotFoundException

If the field is absent

IncorrectFieldValueException

if the field value cannot be converted to long

GetSpan(int)

Returns the field value as ReadOnlySpan<T>.

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

Tag number

Returns
Type Description
ReadOnlySpan<byte>

Field value as ReadOnlySpan<T>

Exceptions
Type Condition
TagNotFoundException

If the field is absent

GetTimeSpan(int)

Returns the field value as TimeSpan.

Declaration
TimeSpan GetTimeSpan(int tag)
Parameters
Type Name Description
int tag

Tag number

Returns
Type Description
TimeSpan

Field value as TimeSpan

Exceptions
Type Condition
TagNotFoundException

If the field is absent

IncorrectFieldValueException

if the field value cannot be parsed to TimeSpan using either HH:MM:SS (whole seconds) or HH:MM:SS.sss (milliseconds) or HH:MM:SS.sssssss (microseconds) or HH:MM:SS.ssssssssss (nanoseconds) or HH:MM:SS.sssssssssssss (picoseconds) format

GetTimeSpan(int, out TimeSpanFormat)

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

Declaration
TimeSpan GetTimeSpan(int tag, out TimeSpanFormat format)
Parameters
Type Name Description
int tag

Tag number

TimeSpanFormat format

Value format

Returns
Type Description
TimeSpan

Field value as TimeSpan

Exceptions
Type Condition
TagNotFoundException

If the field is absent

IncorrectFieldValueException

if the field value cannot be parsed to TimeSpan using either HH:MM:SS (whole seconds) or HH:MM:SS.sss (milliseconds) or HH:MM:SS.sssssss (microseconds) or HH:MM:SS.ssssssssss (nanoseconds) or HH:MM:SS.sssssssssssss (picoseconds) format

GetTimestamp(int)

Returns the field value as DateTime.

Declaration
DateTime GetTimestamp(int tag)
Parameters
Type Name Description
int tag

Tag number

Returns
Type Description
DateTime

Field value as DateTime

Exceptions
Type Condition
TagNotFoundException

If the field is absent

IncorrectFieldValueException

if the field value cannot be parsed to DateTime using either YYYYMMDD-HH:MM:SS (whole seconds) or YYYYMMDD-HH:MM:SS.sss (milliseconds) or YYYYMMDD-HH:MM:SS.sssssss (microseconds) or YYYYMMDD-HH:MM:SS.ssssssssss (nanoseconds) or YYYYMMDD-HH:MM:SS.sssssssssssss (picoseconds) format

GetTimestamp(int, out TimestampFormat)

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

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

Tag number

TimestampFormat format

Value format

Returns
Type Description
DateTime

Field value as DateTime

Exceptions
Type Condition
TagNotFoundException

If the field is absent

IncorrectFieldValueException

if the field value cannot be parsed to DateTime using either YYYYMMDD-HH:MM:SS (whole seconds) or YYYYMMDD-HH:MM:SS.sss (milliseconds) or YYYYMMDD-HH:MM:SS.sssssss (microseconds) or YYYYMMDD-HH:MM:SS.ssssssssss (nanoseconds) or YYYYMMDD-HH:MM:SS.sssssssssssss (picoseconds) format

GetUInteger(int)

Returns the field value as uint.

Declaration
uint GetUInteger(int tag)
Parameters
Type Name Description
int tag

Tag number

Returns
Type Description
uint

Field value as uint

Exceptions
Type Condition
TagNotFoundException

If the field is absent

IncorrectFieldValueException

if the field value cannot be converted to int

GetULong(int)

Returns the field value as ulong.

Declaration
ulong GetULong(int tag)
Parameters
Type Name Description
int tag

Tag number

Returns
Type Description
ulong

Field value as ulong

Exceptions
Type Condition
TagNotFoundException

If the field is absent

IncorrectFieldValueException

if the field value cannot be converted to ulong

HasGroup(int)

Checks the pretense of the repeating group.

Note: the checking excludes nested repeating groups.

Declaration
bool HasGroup(int tag)
Parameters
Type Name Description
int tag

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

Returns
Type Description
bool

true if the group is set, false if the group is not set or is not defined for this message

IsAbsentOrEmpty(int)

Checks that the field is absent or empty.

Declaration
bool IsAbsentOrEmpty(int tag)
Parameters
Type Name Description
int tag

Tag number

Returns
Type Description
bool

true if the field is either absent or empty, otherwise - false

Remove(int)

Removes the field.

Declaration
bool Remove(int tag)
Parameters
Type Name Description
int tag

Tag number

Returns
Type Description
bool

true If the field was found and removed, otherwise false

Set(int, in HighResolutionTimeSpan)

Sets the field value as HighResolutionTimeSpan.

Declaration
IFieldSet Set(int tag, in HighResolutionTimeSpan value)
Parameters
Type Name Description
int tag

Tag number

HighResolutionTimeSpan value

Field value

Returns
Type Description
IFieldSet

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, in HighResolutionTimeSpan, TimeSpanFormat)

Sets the field value as HighResolutionTimeSpan.

Declaration
IFieldSet Set(int tag, in HighResolutionTimeSpan value, TimeSpanFormat format)
Parameters
Type Name Description
int tag

Tag number

HighResolutionTimeSpan value

Field value

TimeSpanFormat format

Value format

Returns
Type Description
IFieldSet

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, in HighResolutionTimestamp)

Sets the field value as HighResolutionTimestamp.

Declaration
IFieldSet Set(int tag, in HighResolutionTimestamp value)
Parameters
Type Name Description
int tag

Tag number

HighResolutionTimestamp value

Field value

Returns
Type Description
IFieldSet

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, in HighResolutionTimestamp, TimestampFormat)

Sets the field value as HighResolutionTimestamp.

Declaration
IFieldSet Set(int tag, in HighResolutionTimestamp value, TimestampFormat format)
Parameters
Type Name Description
int tag

Tag number

HighResolutionTimestamp value

Field value

TimestampFormat format

Value format

Returns
Type Description
IFieldSet

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, bool)

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

Declaration
IFieldSet Set(int tag, bool value)
Parameters
Type Name Description
int tag

Tag number

bool value

true for 'Y', false for 'N'

Returns
Type Description
IFieldSet

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, byte[])

Sets the byte[] value.

Declaration
IFieldSet Set(int tag, byte[] value)
Parameters
Type Name Description
int tag

Tag number

byte[] value

Field value

Returns
Type Description
IFieldSet

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, byte[], int, int)

Sets the byte[] value.

Declaration
IFieldSet Set(int tag, byte[] value, int offset, int length)
Parameters
Type Name Description
int tag

Tag number

byte[] value

Field value

int offset

Value offset

int length

Value length

Returns
Type Description
IFieldSet

This instance

Exceptions
Type Condition
TagNotDefinedForThisMessageTypeException

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

ArgumentException

(offset < 0) or (offset + length > value.length) or (length < 0)

Set(int, char)

Sets the field value as a character.

Declaration
IFieldSet Set(int tag, char value)
Parameters
Type Name Description
int tag

Tag number

char value

Field value

Returns
Type Description
IFieldSet

This instance

Exceptions
Type Condition
TagNotDefinedForThisMessageTypeException

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

Set(int, DateTime)

Sets the field value as DateTime.

Declaration
IFieldSet Set(int tag, DateTime value)
Parameters
Type Name Description
int tag

Tag number

DateTime value

Field value

Returns
Type Description
IFieldSet

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, DateTime, TimestampFormat)

Sets the field value as DateTime.

Declaration
IFieldSet Set(int tag, DateTime value, TimestampFormat format)
Parameters
Type Name Description
int tag

Tag number

DateTime value

Field value

TimestampFormat format

Value format

Returns
Type Description
IFieldSet

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, decimal)

Sets the field value as decimal .

Declaration
IFieldSet Set(int tag, decimal value)
Parameters
Type Name Description
int tag

Tag number

decimal value

Field value

Returns
Type Description
IFieldSet

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, decimal, int)

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

Declaration
IFieldSet Set(int tag, decimal value, int precision)
Parameters
Type Name Description
int tag

Tag number

decimal value

Field value

int precision

The desired number of decimal places

Returns
Type Description
IFieldSet

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, double)

Sets the double field value.

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

Note: Rounds value to 15 significant digits using rounding to nearest. This is done even if the number has more than 15 digits and the less significant digits are zero.

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

Declaration
IFieldSet Set(int tag, double value)
Parameters
Type Name Description
int tag

Tag number

double value

Field value

Returns
Type Description
IFieldSet

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, 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
IFieldSet Set(int tag, double value, int precision)
Parameters
Type Name Description
int tag

Tag number

double value

Field value

int precision

The desired number of decimal places

Returns
Type Description
IFieldSet

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)

Sets the integer field value.

Declaration
IFieldSet Set(int tag, int value)
Parameters
Type Name Description
int tag

Tag number

int value

Field value

Returns
Type Description
IFieldSet

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, long)

Sets the ulong field value.

Declaration
IFieldSet Set(int tag, long value)
Parameters
Type Name Description
int tag

Tag number

long value

Field value

Returns
Type Description
IFieldSet

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, ReadOnlySpan<byte>)

Sets the ReadOnlySpan<T> value.

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

Tag number

ReadOnlySpan<byte> value

Field value

Returns
Type Description
IFieldSet

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, string)

Sets the string value.

Declaration
IFieldSet Set(int tag, string value)
Parameters
Type Name Description
int tag

Tag number

string value

Field value

Returns
Type Description
IFieldSet

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, StringBuilder)

Sets the string value.

Declaration
IFieldSet Set(int tag, StringBuilder value)
Parameters
Type Name Description
int tag

Tag number

StringBuilder value

Field value

Returns
Type Description
IFieldSet

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, TimeSpan)

Sets the field value as TimeSpan.

Declaration
IFieldSet Set(int tag, TimeSpan value)
Parameters
Type Name Description
int tag

Tag number

TimeSpan value

Field value

Returns
Type Description
IFieldSet

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, TimeSpan, TimeSpanFormat)

Sets the field value as TimeSpan.

Declaration
IFieldSet Set(int tag, TimeSpan value, TimeSpanFormat format)
Parameters
Type Name Description
int tag

Tag number

TimeSpan value

Field value

TimeSpanFormat format

Value format

Returns
Type Description
IFieldSet

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, uint)

Sets the unsigned integer field value.

Declaration
IFieldSet Set(int tag, uint value)
Parameters
Type Name Description
int tag

Tag number

uint value

Field value

Returns
Type Description
IFieldSet

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, ulong)

Sets the ulong field value.

Declaration
IFieldSet Set(int tag, ulong value)
Parameters
Type Name Description
int tag

Tag number

ulong value

Field value

Returns
Type Description
IFieldSet

This instance

Exceptions
Type Condition
TagNotDefinedForThisMessageTypeException

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

SetFlag(int, bool)

Sets the flag value - 'Y' or 'N'.

Declaration
IFieldSet SetFlag(int tag, bool value = true)
Parameters
Type Name Description
int tag

Tag number

bool value

true for 'Y', false for 'N'

Returns
Type Description
IFieldSet

This instance

Exceptions
Type Condition
TagNotDefinedForThisMessageTypeException

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

SetGroup(int, int)

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

Declaration
Group SetGroup(int tag, int numberOfInstances)
Parameters
Type Name Description
int tag

Tag number of the field that defines the number of repeated instances in this repeating group

int numberOfInstances

Number of repeated instances in this repeating group

Returns
Type Description
Group

Repeating group

Exceptions
Type Condition
TagNotDefinedForThisMessageTypeException

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

ToString(char, FixStringFormat)

Returns the string representation using the given delimiter and format.

Declaration
string ToString(char delimiter, FixStringFormat format = FixStringFormat.TagNumber)
Parameters
Type Name Description
char delimiter

delimiter

FixStringFormat format

format

Returns
Type Description
string

string representation

TryGet(int, out string)

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

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

Tag number

string result

Field value

Returns
Type Description
bool

true if the field value was converted, otherwise - false

TryGet(int, StringBuilder)

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

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

Tag number

StringBuilder result

Field value

Returns
Type Description
bool

true if the field value was converted, otherwise - false

TryGetBytes(int, out byte[])

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

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

Tag number

byte[] result

Field value

Returns
Type Description
bool

true if the field value was converted, otherwise - false

TryGetChar(int, out char)

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

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

Tag number

char result

Field value as a character

Returns
Type Description
bool

true if the field value was converted, otherwise - false

TryGetDecimal(int, out decimal)

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

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

Tag number

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, 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
bool TryGetDouble(int tag, out double result)
Parameters
Type Name Description
int tag

Tag number

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, out bool)

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

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

Tag number

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, out Group)

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

Declaration
bool TryGetGroup(int tag, 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)

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, out HighResolutionTimeSpan)

Returns the field value as HighResolutionTimeSpan .

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

Tag number

HighResolutionTimeSpan result

Field value

Returns
Type Description
bool

true if the field value was converted, otherwise - false

TryGetHighResolutionTimeSpan(int, out HighResolutionTimeSpan, out TimeSpanFormat)

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

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

Tag number

HighResolutionTimeSpan result

Field value

TimeSpanFormat format

Value format

Returns
Type Description
bool

true if the field value was converted, otherwise - false

TryGetHighResolutionTimestamp(int, out HighResolutionTimestamp)

Returns the field value as HighResolutionTimestamp .

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

Tag number

HighResolutionTimestamp result

Field value

Returns
Type Description
bool

true if the field value was converted, otherwise - false

TryGetHighResolutionTimestamp(int, out HighResolutionTimestamp, out TimestampFormat)

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

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

Tag number

HighResolutionTimestamp result

Field value

TimestampFormat format

Value format

Returns
Type Description
bool

true if the field value was converted, otherwise - false

TryGetInteger(int, out int)

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

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

Tag number

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, out long)

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

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

Tag number

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, out ReadOnlySpan<byte>)

Returns the field value as ReadOnlySpan<T>. A return value indicates whether the operation succeeded.

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

Tag number

ReadOnlySpan<byte> result

Field value

Returns
Type Description
bool

true if the field value was converted, otherwise - false

TryGetTimeSpan(int, out TimeSpan)

Returns the field value as TimeSpan .

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

Tag number

TimeSpan result

Field value

Returns
Type Description
bool

true if the field value was converted, otherwise - false

TryGetTimeSpan(int, out TimeSpan, out TimeSpanFormat)

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

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

Tag number

TimeSpan result

Field value

TimeSpanFormat format

Value format

Returns
Type Description
bool

true if the field value was converted, otherwise - false

TryGetTimestamp(int, out DateTime)

Returns the field value as DateTime .

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

Tag number

DateTime result

Field value

Returns
Type Description
bool

true if the field value was converted, otherwise - false

TryGetTimestamp(int, out DateTime, out TimestampFormat)

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

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

Tag number

DateTime result

Field value

TimestampFormat format

Value format

Returns
Type Description
bool

true if the field value was converted, otherwise - false

TryGetUInteger(int, out uint)

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

Declaration
bool TryGetUInteger(int tag, out uint result)
Parameters
Type Name Description
int tag

Tag number

uint result

The 32-bit unsigned 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

TryGetULong(int, out ulong)

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

Declaration
bool TryGetULong(int tag, out ulong result)
Parameters
Type Name Description
int tag

Tag number

ulong result

The 64-bit unsigned 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

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