Class MessageInfoDictionary
Dictionary of a FIX Protocol Specification.
Implements
Inherited Members
Namespace: OnixS.Fix
Assembly: OnixS.Fix.Engine.dll
Syntax
public class MessageInfoDictionary : IMessageInfoDictionary, ICloneable, ICollection<MessageInfo>, IReadOnlyCollection<MessageInfo>, IEnumerable<MessageInfo>, ICollection<FieldTypeInfo>, IReadOnlyCollection<FieldTypeInfo>, IEnumerable<FieldTypeInfo>, IEnumerable
Constructors
MessageInfoDictionary(ProtocolVersion)
Constructor.
Declaration
public MessageInfoDictionary(ProtocolVersion version)
Parameters
Type | Name | Description |
---|---|---|
ProtocolVersion | version | FIX protocol version. |
MessageInfoDictionary(ProtocolVersion, params MessageInfo[])
Constructor.
Declaration
public MessageInfoDictionary(ProtocolVersion version, params MessageInfo[] messages)
Parameters
Type | Name | Description |
---|---|---|
ProtocolVersion | version | FIX protocol version. |
MessageInfo[] | messages | List of messages, belongs to this dictionary. |
MessageInfoDictionary(ProtocolVersion, string)
Constructor.
Declaration
public MessageInfoDictionary(ProtocolVersion version, string id)
Parameters
Type | Name | Description |
---|---|---|
ProtocolVersion | version | FIX protocol version. |
string | id | Dictionary id. |
MessageInfoDictionary(ProtocolVersion, string, params MessageInfo[])
Constructor.
Declaration
public MessageInfoDictionary(ProtocolVersion version, string id, params MessageInfo[] messages)
Parameters
Type | Name | Description |
---|---|---|
ProtocolVersion | version | FIX protocol version. |
string | id | Dictionary id. |
MessageInfo[] | messages | List of messages, belongs to this dictionary. |
Fields
customMessagesByType
Declaration
protected readonly Dictionary<string, MessageInfo> customMessagesByType
Field Value
Type | Description |
---|---|
Dictionary<string, MessageInfo> |
messagesByType
Declaration
protected readonly Dictionary<ulong, MessageInfo> messagesByType
Field Value
Type | Description |
---|---|
Dictionary<ulong, MessageInfo> |
Properties
Count
Gets the number of messages contained in the ICollection<T>.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
int |
Description
FIX specification description.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
string | FIX specification description |
Id
Dictionary id.
If not specified, FIX protocol version will be used.
Declaration
public string Id { get; set; }
Property Value
Type | Description |
---|---|
string | FIX specification id |
IsReadOnly
Gets a value indicating whether the ICollection<T> is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
bool |
MessageTypes
Gets types of messages contained in the dictionary.
Declaration
public IEnumerable<string> MessageTypes { get; }
Property Value
Type | Description |
---|---|
IEnumerable<string> |
Name
FIX specification name.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string | FIX specification name |
Revision
FIX specification revision.
Declaration
public string Revision { get; set; }
Property Value
Type | Description |
---|---|
string | FIX specification revision |
Types
FIX types that belong to this FIX Specification.
Declaration
public Dictionary<string, FieldTypeInfo> Types { get; }
Property Value
Type | Description |
---|---|
Dictionary<string, FieldTypeInfo> | FIX types that belong to this FIX Specification |
Version
FIX protocol version.
Declaration
public ProtocolVersion Version { get; }
Property Value
Type | Description |
---|---|
ProtocolVersion | FIX protocol version |
Methods
Add(FieldTypeInfo)
Adds an item to the ICollection<T>.
Declaration
public void Add(FieldTypeInfo item)
Parameters
Type | Name | Description |
---|---|---|
FieldTypeInfo | item | The object to add to the ICollection<T>. |
Add(MessageInfo)
Adds an item to the ICollection<T>.
Declaration
public void Add(MessageInfo item)
Parameters
Type | Name | Description |
---|---|---|
MessageInfo | item | The object to add to the ICollection<T>. |
Clear()
Removes all items from the ICollection<T>.
Declaration
public void Clear()
Clone()
Creates a new object that is a copy of the current instance.
Declaration
public virtual object Clone()
Returns
Type | Description |
---|---|
object | A new object that is a copy of this instance. |
Contains(FieldTypeInfo)
Determines whether the ICollection<T> contains a specific value.
Declaration
public bool Contains(FieldTypeInfo item)
Parameters
Type | Name | Description |
---|---|---|
FieldTypeInfo | item | The object to locate in the ICollection<T>. |
Returns
Type | Description |
---|---|
bool | true if item is found in the ICollection<T>; otherwise, false. |
Contains(MessageInfo)
Determines whether the ICollection<T> contains a specific value.
Declaration
public bool Contains(MessageInfo item)
Parameters
Type | Name | Description |
---|---|---|
MessageInfo | item | The object to locate in the ICollection<T>. |
Returns
Type | Description |
---|---|
bool | true if item is found in the ICollection<T>; otherwise, false. |
Contains(string)
Determines whether the ICollection<T> contains a specific value.
Declaration
public bool Contains(string msgType)
Parameters
Type | Name | Description |
---|---|---|
string | msgType | The message type to locate in the ICollection<T>. |
Returns
Type | Description |
---|---|
bool | true if message type is found in the ICollection<T>; otherwise, false. |
CopyTo(FieldTypeInfo[], int)
Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.
Declaration
public void CopyTo(FieldTypeInfo[] array, int arrayIndex)
Parameters
Type | Name | Description |
---|---|---|
FieldTypeInfo[] | array | The one-dimensional Array that is the destination of the elements copied from ICollection<T>. The Array must have zero-based indexing. |
int | arrayIndex | The zero-based index in array at which copying begins. |
CopyTo(MessageInfo[], int)
Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.
Declaration
public void CopyTo(MessageInfo[] array, int arrayIndex)
Parameters
Type | Name | Description |
---|---|---|
MessageInfo[] | array | The one-dimensional Array that is the destination of the elements copied from ICollection<T>. The Array must have zero-based indexing. |
int | arrayIndex | The zero-based index in array at which copying begins. |
CreateMessageInfoDictionary()
Returns modifiable copy of the dictionary.
Declaration
public MessageInfoDictionary CreateMessageInfoDictionary()
Returns
Type | Description |
---|---|
MessageInfoDictionary |
Find(string)
Finds the MessageInfoDictionary by the given Id in the Engine instance.
Note: the Engine should be initialized.
Declaration
public static IMessageInfoDictionary Find(string id)
Parameters
Type | Name | Description |
---|---|---|
string | id | Dictionary Id |
Returns
Type | Description |
---|---|
IMessageInfoDictionary | The Dictionary associated with the given id. |
Exceptions
Type | Condition |
---|---|
KeyNotFoundException | The given Id is not found |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<MessageInfo> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<MessageInfo> | An enumerator that can be used to iterate through the collection. |
GetMaxNumberOfFields()
Returns max number of fields on any level for all messages in a dictionary.
Declaration
public int GetMaxNumberOfFields()
Returns
Type | Description |
---|---|
int |
GetMaxNumberOfGroups()
Returns max number of groups on any level for all messages in a dictionary.
Declaration
public int GetMaxNumberOfGroups()
Returns
Type | Description |
---|---|
int |
GetMessageInfo(string)
Returns message info that belongs to the dictionary.
Declaration
public MessageInfo GetMessageInfo(string msgType)
Parameters
Type | Name | Description |
---|---|---|
string | msgType |
Returns
Type | Description |
---|---|
MessageInfo |
Remove(FieldTypeInfo)
Removes the first occurrence of a specific object from the ICollection<T>.
Declaration
public bool Remove(FieldTypeInfo item)
Parameters
Type | Name | Description |
---|---|---|
FieldTypeInfo | item | The object to remove from the ICollection<T>. |
Returns
Type | Description |
---|---|
bool | true if item was successfully removed from the ICollection<T>; otherwise, false. This method also returns false if item is not found in the original ICollection<T>. |
Remove(MessageInfo)
Removes the first occurrence of a specific object from the ICollection<T>.
Declaration
public bool Remove(MessageInfo item)
Parameters
Type | Name | Description |
---|---|---|
MessageInfo | item | The object to remove from the ICollection<T>. |
Returns
Type | Description |
---|---|
bool | true if item was successfully removed from the ICollection<T>; otherwise, false. This method also returns false if item is not found in the original ICollection<T>. |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current object. |
Overrides
TryGetMessageInfo(ReadOnlySpan<byte>, out MessageInfo)
Returns message info that belongs to the dictionary.
Declaration
public bool TryGetMessageInfo(ReadOnlySpan<byte> msgType, out MessageInfo messageInfo)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<byte> | msgType | Type of message |
MessageInfo | messageInfo | When this method returns, contains the message info for the specified message type, if the message type is found; otherwise, the default value for the message info. This parameter is passed uninitialized. |
Returns
Type | Description |
---|---|
bool | true if the Dictionary contains a message with the specified type; otherwise, false. |
TryGetMessageInfo(string, out MessageInfo)
Returns message info that belongs to this FIX Specification
Declaration
public bool TryGetMessageInfo(string msgType, out MessageInfo messageInfo)
Parameters
Type | Name | Description |
---|---|---|
string | msgType | Type of message |
MessageInfo | messageInfo | When this method returns, contains the message info for the specified message type, if the message type is found; otherwise, the default value for the message info. This parameter is passed uninitialized. |
Returns
Type | Description |
---|---|
bool | true if the Dictionary contains a message with the specified type; otherwise, false. |