Class FieldSet
Collection of Fields.
Inherited Members
Namespace: OnixS.Fix
Assembly: OnixS.Fix.Engine.dll
Syntax
public abstract class FieldSet : IFieldSet, IEnumerable<Field>, IEnumerable, IDisposable
Constructors
FieldSet()
Declaration
protected FieldSet()
FieldSet(Message, FieldContainerInfo)
Declaration
protected FieldSet(Message parentMessage, FieldContainerInfo desc)
Parameters
Type | Name | Description |
---|---|---|
Message | parentMessage | |
FieldContainerInfo | desc |
FieldSet(int, int, MessageMemoryPool)
Declaration
protected FieldSet(int numberOfFields, int numberOfGroups, MessageMemoryPool memoryPool = null)
Parameters
Type | Name | Description |
---|---|---|
int | numberOfFields | |
int | numberOfGroups | |
MessageMemoryPool | memoryPool |
Properties
FieldCount
Returns the number of tag/value pairs excluding nested repeating groups.
Declaration
public int FieldCount { get; }
Property Value
Type | Description |
---|---|
int | The number of tag/value pairs excluding nested repeating groups |
IsDisposed
Declaration
public bool IsDisposed { get; }
Property Value
Type | Description |
---|---|
bool |
this[int]
Returns the field value as string.
Declaration
public string this[int tag] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
int | tag | Tag number |
Property Value
Type | Description |
---|---|
string | Field value as string, |
NumberOfFields
Declaration
public int NumberOfFields { get; }
Property Value
Type | Description |
---|---|
int |
NumberOfGroups
Returns the number of repeating groups defined on the current level excluding nested repeating groups.
Declaration
public int NumberOfGroups { get; set; }
Property Value
Type | Description |
---|---|
int | Number of repeating groups defined on the current level excluding nested repeating groups |
Methods
AddField()
Declaration
protected int AddField()
Returns
Type | Description |
---|---|
int |
Assemble(ByteBuffer)
Declaration
public virtual void Assemble(ByteBuffer bb)
Parameters
Type | Name | Description |
---|---|---|
ByteBuffer | bb |
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
public 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
public bool Contains(int tag)
Parameters
Type | Name | Description |
---|---|---|
int | tag | Tag number |
Returns
Type | Description |
---|---|
bool |
|
Contains(int, bool)
Checks the field presence.
Declaration
public virtual bool Contains(int tag, bool nested)
Parameters
Type | Name | Description |
---|---|---|
int | tag | Tag number |
bool | nested |
|
Returns
Type | Description |
---|---|
bool |
|
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
EnsureNotDisposed()
Declaration
protected void EnsureNotDisposed()
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, StringBuilder)
Returns the field value as string.
Declaration
public 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
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 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
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 |
GetEnumerator()
Declaration
public FieldSet.FieldEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
FieldSet.FieldEnumerator |
GetFields()
Returns message fields.
Declaration
public Field[] GetFields()
Returns
Type | Description |
---|---|
Field[] | Message fields |
GetFlag(int)
Returns the flag value.
Declaration
public bool GetFlag(int tag)
Parameters
Type | Name | Description |
---|---|---|
int | tag | Tag number |
Returns
Type | Description |
---|---|
bool |
|
GetGroup(int)
Returns the repeating group.
Declaration
public 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 |
GetGroupByPsn(int)
Declaration
protected Group GetGroupByPsn(int psn)
Parameters
Type | Name | Description |
---|---|---|
int | psn |
Returns
Type | Description |
---|---|
Group |
GetGroupsEnumerator()
Returns an iterator over groups of the current level excludes nested repeating groups.
Declaration
public 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
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 |
GetMessage()
Declaration
protected abstract Message GetMessage()
Returns
Type | Description |
---|---|
Message |
GetPosition(int)
Declaration
protected virtual int GetPosition(int tag)
Parameters
Type | Name | Description |
---|---|---|
int | tag |
Returns
Type | Description |
---|---|
int |
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 |
HasGroup(int)
Checks the pretense of the repeating group.
Note: the checking excludes nested repeating groups.
Declaration
public 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 |
|
Init(Message, FieldContainerInfo)
Declaration
protected void Init(Message parentMessage, FieldContainerInfo desc)
Parameters
Type | Name | Description |
---|---|---|
Message | parentMessage | |
FieldContainerInfo | desc |
Init(Message, FieldSet)
Declaration
protected void Init(Message parentMessage, FieldSet fixBlock)
Parameters
Type | Name | Description |
---|---|---|
Message | parentMessage | |
FieldSet | fixBlock |
InitGroup(FieldInfo)
Declaration
protected Group InitGroup(FieldInfo fieldDefinition)
Parameters
Type | Name | Description |
---|---|---|
FieldInfo | fieldDefinition |
Returns
Type | Description |
---|---|
Group |
IsAbsentOrEmpty(int)
Checks that the field is absent or empty.
Declaration
public bool IsAbsentOrEmpty(int tag)
Parameters
Type | Name | Description |
---|---|---|
int | tag | Tag number |
Returns
Type | Description |
---|---|
bool |
|
Remove(int)
Removes the field.
Declaration
public virtual bool Remove(int tag)
Parameters
Type | Name | Description |
---|---|---|
int | tag | Tag number |
Returns
Type | Description |
---|---|
bool |
|
Set(int, in HighResolutionTimeSpan)
Sets the field value as HighResolutionTimeSpan.
Declaration
public 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
public 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
public 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
public 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
public IFieldSet Set(int tag, bool value)
Parameters
Type | Name | Description |
---|---|---|
int | tag | Tag number |
bool | 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[])
Sets the byte[] value.
Declaration
public 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
public virtual 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 |
|
Set(int, char)
Sets the field value as a character.
Declaration
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public virtual 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
public virtual 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
public virtual 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
public 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
public 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
public 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
public 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
public IFieldSet SetFlag(int tag, bool value)
Parameters
Type | Name | Description |
---|---|---|
int | tag | Tag number |
bool | 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 |
SetGroup(int, int)
Creates a new repeating group or changes the number of repeated instances in the existing repeating group.
Declaration
public 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 |
ToRawFixString()
Declaration
public string ToRawFixString()
Returns
Type | Description |
---|---|
string |
ToString()
Returns a string that represents the current Message object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current Message object |
Overrides
ToString(FixStringFormat)
Returns a string that represents the current Message object in accordance with the specified FixStringFormat.
Declaration
public string ToString(FixStringFormat format)
Parameters
Type | Name | Description |
---|---|---|
FixStringFormat | format |
Returns
Type | Description |
---|---|
string | A string that represents the current Message object in accordance with the specified FixStringFormat |
ToString(char, FixStringFormat)
Returns a string that represents the current Message object in accordance with the specified delimiter and FixStringFormat.
Declaration
public string ToString(char delimiter, FixStringFormat format = FixStringFormat.TagNumber)
Parameters
Type | Name | Description |
---|---|---|
char | delimiter | |
FixStringFormat | format |
Returns
Type | Description |
---|---|
string | A string that represents the current Message object in accordance with the specified delimiter and FixStringFormat |
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 |
|
TryGet(int, StringBuilder)
Returns the field value as string. A return value indicates whether the operation succeeded.
Declaration
public bool TryGet(int tag, StringBuilder result)
Parameters
Type | Name | Description |
---|---|---|
int | tag | Tag number |
StringBuilder | 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 |
|
TryGetGroup(int, out Group)
Returns the repeating group. A return value indicates whether the operation succeeded.
Declaration
public 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 |
|
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 |
|
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
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 unsigned 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 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 |
|
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
public 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 |
|