• Version 1.15.2
Show / Hide Table of Contents

Class FlatGroupReader

Repeating Group Reader for a Flat Message.

Inheritance
object
FlatGroupReader
Implements
IEnumerable<FlatGroupReader>
IEnumerable
IEnumerator<FlatGroupReader>
IEnumerator
IDisposable
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: OnixS.Fix
Assembly: OnixS.Fix.Engine.dll
Syntax
public sealed class FlatGroupReader : IEnumerable<FlatGroupReader>, IEnumerable, IEnumerator<FlatGroupReader>, IEnumerator, IDisposable

Constructors

FlatGroupReader(FieldInfo)

Сonstructor.

Declaration
public FlatGroupReader(FieldInfo fieldInfo)
Parameters
Type Name Description
FieldInfo fieldInfo

Group field info

FlatGroupReader(int)

Сonstructor.

Declaration
public FlatGroupReader(int numberOfEntriesTag)
Parameters
Type Name Description
int numberOfEntriesTag

Number of Entries tag

Properties

Current

Gets the element in the collection at the current position of the enumerator.

Declaration
public FlatGroupReader Current { get; }
Property Value
Type Description
FlatGroupReader

Methods

Contains(int)

Returns whether the field with the given tag is set.

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

tag of the field to search

Returns
Type Description
bool

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

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()

Get(int)

Returns the field value as string.

Declaration
public 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, out Field)

Fills the given Field with reference to value by the given tag.

Declaration
public bool Get(int tag, out Field field)
Parameters
Type Name Description
int tag

field tag

Field field

field to be filled

Returns
Type Description
bool

true if the field is found, otherwise - false

GetBytes(int)

Returns the field value as byte[].

Declaration
public 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
public int GetChar(int tag)
Parameters
Type Name Description
int tag

Tag number

Returns
Type Description
int

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
public 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
public 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

GetFlag(int)

Returns the flag value.

Declaration
public 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

GetHighResolutionTimeSpan(int)

Returns the field value as TimeSpan.

Declaration
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public 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 uint

GetULong(int)

Returns the field value as ulong.

Declaration
public 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

MoveNext()

Advances the enumerator to the next element of the collection.

Declaration
public bool MoveNext()
Returns
Type Description
bool

true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.

Reset()

Sets the enumerator to its initial position, which is before the first element in the collection.

Declaration
public void Reset()

TryGet(int, out string)

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

Declaration
public 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

TryGetBytes(int, out byte[])

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

Declaration
public 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
public 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
public 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
public 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
public 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

TryGetHighResolutionTimeSpan(int, out HighResolutionTimeSpan)

Returns the field value as HighResolutionTimeSpan .

Declaration
public 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
public 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
public 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
public 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
public 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

TryGetLong(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, 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
public 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
public 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
public 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
public 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
public 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 signed integer equivalent. A return value indicates whether the operation succeeded.

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

Tag number

uint 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

TryGetULong(int, out ulong)

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

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

Tag number

ulong 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

Unwrap()

Detaches the reader.

Declaration
public void Unwrap()

Wrap(FlatGroupReader)

Attaches as a nested repeating group reader.

Declaration
public bool Wrap(FlatGroupReader parentReader)
Parameters
Type Name Description
FlatGroupReader parentReader

parent repeating group reder

Returns
Type Description
bool

true if the parentReader current entry contains the nested repeating group, false otherwise

Wrap(FlatMessage)

Attaches as a top-level repeating group reader.

Declaration
public bool Wrap(FlatMessage message)
Parameters
Type Name Description
FlatMessage message
Returns
Type Description
bool

true if the message contains the group, false otherwise

Implements

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