Class FlatGroupReader
Repeating Group Reader for a Flat Message.
Implements
Inherited Members
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 |
|
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, |
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 |
|
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 |
Exceptions
Type | Condition |
---|---|
TagNotFoundException | If the field is absent |
IncorrectFieldValueException | if the field value cannot be converted to |
GetFlag(int)
Returns the flag value.
Declaration
public bool GetFlag(int tag)
Parameters
Type | Name | Description |
---|---|---|
int | tag | Tag number |
Returns
Type | Description |
---|---|
bool |
|
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 |
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 |
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 |
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 |
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 |
Exceptions
Type | Condition |
---|---|
TagNotFoundException | If the field is absent |
IncorrectFieldValueException | if the field value cannot be converted to |
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 |
Exceptions
Type | Condition |
---|---|
TagNotFoundException | If the field is absent |
IncorrectFieldValueException | if the field value cannot be converted to |
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 |
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 |
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 |
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 |
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 |
Exceptions
Type | Condition |
---|---|
TagNotFoundException | If the field is absent |
IncorrectFieldValueException | if the field value cannot be converted to |
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 |
Exceptions
Type | Condition |
---|---|
TagNotFoundException | If the field is absent |
IncorrectFieldValueException | if the field value cannot be converted to |
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 |
|
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 |
|
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 |
|
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 |
Returns
Type | Description |
---|---|
bool |
|
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 |
Returns
Type | Description |
---|---|
bool |
|
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 |
Returns
Type | Description |
---|---|
bool |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|