Interface IFieldSet
Represents a set of fields.
Namespace: OnixS.SimpleBinaryEncoding
Assembly: OnixS.SimpleBinaryEncoding.dll
Syntax
public interface IFieldSet : ICloneable
Properties
Item[Int32]
Returns value of the string field.
Declaration
string this[int tag] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Property Value
Type | Description |
---|---|
System.String | Value of string field. |
Methods
Contains(Int32)
Returns true if field present in a fieldset and has not null value.
Declaration
bool Contains(int tag)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Returns
Type | Description |
---|---|
System.Boolean | True if field present in a fieldset and has not null value, false otherwise |
GetBoolean(Int32)
Returns value of the boolean field.
Declaration
bool GetBoolean(int tag)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Returns
Type | Description |
---|---|
System.Boolean | Value of the boolean field. |
GetByte(Int32)
Returns value of the byte field.
Declaration
byte GetByte(int tag)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Returns
Type | Description |
---|---|
System.Byte | Value of the byte field. |
GetBytes(Int32)
Returns the raw value of any field.
Declaration
ReadOnlySpan<byte> GetBytes(int tag)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Returns
Type | Description |
---|---|
ReadOnlySpan<System.Byte> | The raw value of the field. |
GetChar(Int32)
Returns value of char field.
Declaration
char GetChar(int tag)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Returns
Type | Description |
---|---|
System.Char | Value of the char field. |
GetComposite(Int32)
Returns value of the composite type field.
Declaration
IComposite GetComposite(int tag)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Returns
Type | Description |
---|---|
IComposite | Value of the composite type field. |
GetComposite<T>(Int32)
Returns value of the composite type field.
Declaration
T GetComposite<T>(int tag)
where T : IComposite
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Returns
Type | Description |
---|---|
T | Value of the composite type field. |
Type Parameters
Name | Description |
---|---|
T | Preregistered type of the composite field. |
GetDecimal(Int32)
Returns value of the decimal field.
Declaration
decimal GetDecimal(int tag)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Returns
Type | Description |
---|---|
System.Decimal | Value of the decimal field. |
GetEnum<T>(Int32)
Returns value of the enumeration field.
Declaration
T GetEnum<T>(int tag)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Returns
Type | Description |
---|---|
T | Value of enumeration field, which is casted to the enumeration type. |
Type Parameters
Name | Description |
---|---|
T |
GetGroup(Int32)
Returns repeating group.
Declaration
IGroup GetGroup(int tag)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Returns
Type | Description |
---|---|
IGroup | Repeating group. |
GetInteger(Int32)
Returns value of the integer field.
Declaration
int GetInteger(int tag)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Returns
Type | Description |
---|---|
System.Int32 | Value of the integer field. |
GetLong(Int32)
Returns value of the long field.
Declaration
long GetLong(int tag)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Returns
Type | Description |
---|---|
System.Int64 | Value of the long field. |
GetMaturityMonthYear(Int32)
Returns value of the maturity month year field.
Declaration
IMaturityMonthYear GetMaturityMonthYear(int tag)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Returns
Type | Description |
---|---|
IMaturityMonthYear | Value of the maturity month year field. |
GetShort(Int32)
Returns value of the short field.
Declaration
short GetShort(int tag)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Returns
Type | Description |
---|---|
System.Int16 | Value of short field. |
GetSignedByte(Int32)
Returns value of the signed byte field.
Declaration
sbyte GetSignedByte(int tag)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Returns
Type | Description |
---|---|
System.SByte | Value of the signed byte field. |
GetString(Int32)
Returns value of the string field.
Declaration
string GetString(int tag)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Returns
Type | Description |
---|---|
System.String | Value of the string field. |
GetTimestamp(Int32)
Returns value of the timestamp field.
Declaration
ITimestamp GetTimestamp(int tag)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Returns
Type | Description |
---|---|
ITimestamp | Value of the timestamp field. |
GetUnsignedInteger(Int32)
Returns value of the unsigned integer field.
Declaration
uint GetUnsignedInteger(int tag)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Returns
Type | Description |
---|---|
System.UInt32 | Value of the unsigned integer field. |
GetUnsignedLong(Int32)
Returns value of the unsigned long field.
Declaration
ulong GetUnsignedLong(int tag)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Returns
Type | Description |
---|---|
System.UInt64 | Value of the unsigned long field. |
GetUnsignedShort(Int32)
Returns value of the unsigned short field.
Declaration
ushort GetUnsignedShort(int tag)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Returns
Type | Description |
---|---|
System.UInt16 | Value of the unsigned short field. |
GetVariableLengthField(Int32)
Returns value of the variable-length field.
Declaration
IVariableLengthField GetVariableLengthField(int tag)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Returns
Type | Description |
---|---|
IVariableLengthField | Value of the variable-length field. |
SetBoolean(Int32, Boolean)
Set the value of the boolean field.
Declaration
IFieldSet SetBoolean(int tag, bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
System.Boolean | value | Field value. |
Returns
Type | Description |
---|---|
IFieldSet |
SetByte(Int32, Byte)
Set the value of the byte field.
Declaration
IFieldSet SetByte(int tag, byte value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
System.Byte | value | Field value. |
Returns
Type | Description |
---|---|
IFieldSet |
SetByte(Int32, Int32)
Set the value of the byte field.
Declaration
IFieldSet SetByte(int tag, int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
System.Int32 | value | Field value. |
Returns
Type | Description |
---|---|
IFieldSet |
Remarks
The method will do a narrowing conversion.
SetBytes(Int32, ReadOnlySpan<Byte>)
Set the raw value of the field. The length of value should be less or equal to the length of the field.
Declaration
IFieldSet SetBytes(int tag, ReadOnlySpan<byte> value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
ReadOnlySpan<System.Byte> | value | Raw value. |
Returns
Type | Description |
---|---|
IFieldSet |
SetChar(Int32, Char)
Set the value of the char field.
Declaration
IFieldSet SetChar(int tag, char value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
System.Char | value | Field value. |
Returns
Type | Description |
---|---|
IFieldSet |
SetDecimal(Int32, Decimal)
Set the value of the decimal field.
Declaration
IFieldSet SetDecimal(int tag, decimal value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
System.Decimal | value | Field value. |
Returns
Type | Description |
---|---|
IFieldSet |
SetEnum<T>(Int32, T)
Set the value of the enumeration field.
Declaration
IFieldSet SetEnum<T>(int tag, T value)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
T | value | Field value. |
Returns
Type | Description |
---|---|
IFieldSet |
Type Parameters
Name | Description |
---|---|
T |
SetGroup(Int32, Int32)
Returns repeating group and set its count to the specified value.
Declaration
IGroup SetGroup(int tag, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
System.Int32 | count | Repeating group entries count. |
Returns
Type | Description |
---|---|
IGroup | Repeating group. |
SetInteger(Int32, Int32)
Set the value of the integer field.
Declaration
IFieldSet SetInteger(int tag, int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
System.Int32 | value | Field value. |
Returns
Type | Description |
---|---|
IFieldSet |
SetLong(Int32, Int64)
Set the value of the long field.
Declaration
IFieldSet SetLong(int tag, long value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
System.Int64 | value | Field value. |
Returns
Type | Description |
---|---|
IFieldSet |
SetShort(Int32, Int16)
Set the value of the short field.
Declaration
IFieldSet SetShort(int tag, short value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
System.Int16 | value | Field value. |
Returns
Type | Description |
---|---|
IFieldSet |
SetShort(Int32, Int32)
Set the value of the short field.
Declaration
IFieldSet SetShort(int tag, int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
System.Int32 | value | Field value. |
Returns
Type | Description |
---|---|
IFieldSet |
Remarks
The method will do a narrowing conversion.
SetSignedByte(Int32, Int32)
Set the value of the signed byte field.
Declaration
IFieldSet SetSignedByte(int tag, int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
System.Int32 | value | Field value. |
Returns
Type | Description |
---|---|
IFieldSet |
Remarks
The method will do a narrowing conversion.
SetSignedByte(Int32, SByte)
Set the value of the signed byte field.
Declaration
IFieldSet SetSignedByte(int tag, sbyte value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
System.SByte | value | Field value. |
Returns
Type | Description |
---|---|
IFieldSet |
SetString(Int32, String)
Set the value of the string field.
Declaration
IFieldSet SetString(int tag, string value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
System.String | value | Field value. |
Returns
Type | Description |
---|---|
IFieldSet |
SetToNull(Int32)
Set optional value to null.
Declaration
IFieldSet SetToNull(int tag)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
Returns
Type | Description |
---|---|
IFieldSet |
SetUnsignedInteger(Int32, UInt32)
Set the value of the unsigned integer field.
Declaration
IFieldSet SetUnsignedInteger(int tag, uint value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
System.UInt32 | value | Field value. |
Returns
Type | Description |
---|---|
IFieldSet |
SetUnsignedLong(Int32, UInt64)
Set the value of the unsigned long field.
Declaration
IFieldSet SetUnsignedLong(int tag, ulong value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
System.UInt64 | value | Field value. |
Returns
Type | Description |
---|---|
IFieldSet |
SetUnsignedShort(Int32, Int32)
Set the value of the unsigned short field.
Declaration
IFieldSet SetUnsignedShort(int tag, int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
System.Int32 | value | Field value. |
Returns
Type | Description |
---|---|
IFieldSet |
Remarks
The method will do a narrowing conversion.
SetUnsignedShort(Int32, UInt16)
Set the value of the unsigned short field.
Declaration
IFieldSet SetUnsignedShort(int tag, ushort value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | Field tag. |
System.UInt16 | value | Field value. |
Returns
Type | Description |
---|---|
IFieldSet |
ToFixString()
Gets FIX string.
Declaration
string ToFixString()
Returns
Type | Description |
---|---|
System.String | FIX string. |
ToString(Char)
Gets string representation of the fieldset.
Declaration
string ToString(char separator = '|')
Parameters
Type | Name | Description |
---|---|---|
System.Char | separator | Fields separator. |
Returns
Type | Description |
---|---|
System.String | FIX string. |