Class Group
FIX Repeating Group.
Inherited Members
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 |
string | value | value to compare |
Returns
Type | Description |
---|---|
bool | , 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 |
Returns
Type | Description |
---|---|
bool | if the field is set, if the field is not set
|
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 |
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 |
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 |
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 |
Returns
Type | Description |
---|---|
char | field value as character, 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 |
Returns
Type | Description |
---|---|
decimal | field value as decimal, 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 |
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 |
Returns
Type | Description |
---|---|
bool |
|
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Returns
Type | Description |
---|---|
long | field value as long, 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 |
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 |
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 |
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 |
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 |
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 |
Returns
Type | Description |
---|---|
bool | in case repeating group belongs to the fix block and actually exists,
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 |
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 |
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 |
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 |
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 |
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 |
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 |
bool | 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, 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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
bool | value | for "Y", 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 |
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
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 |
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 |
|
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 |
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 |
|
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 |
byte[] | result | Field value |
Returns
Type | Description |
---|---|
bool |
|
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 |
char | result | Field value as a character |
Returns
Type | Description |
---|---|
bool |
|
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 |
decimal | result | Contains the |
Returns
Type | Description |
---|---|
bool |
|
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 |
double | result | Contains the |
Returns
Type | Description |
---|---|
bool |
|
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 |
bool | result | Contains |
Returns
Type | Description |
---|---|
bool |
|
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 |
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 |
|
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 |
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 |
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 |
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 |
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 |
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 |
|
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 |
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, 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 |
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 |
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 |
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 |
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 |
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 |