Class Dictionary
Dictionary of a FIX Protocol Specification.
Implements
Inherited Members
Namespace: OnixS.Fix
Assembly: OnixS.Fix.Engine.dll
Syntax
public class Dictionary : ICloneable, ICollection<MessageInfo>, IReadOnlyCollection<MessageInfo>, IEnumerable<MessageInfo>, ICollection<FieldTypeInfo>, IReadOnlyCollection<FieldTypeInfo>, IEnumerable<FieldTypeInfo>, IEnumerable
Constructors
Dictionary(ProtocolVersion)
Constructor.
Declaration
public Dictionary(ProtocolVersion version)
Parameters
Type | Name | Description |
---|---|---|
ProtocolVersion | version | FIX protocol version. |
Dictionary(ProtocolVersion, MessageInfo[])
Constructor.
Declaration
public Dictionary(ProtocolVersion version, params MessageInfo[] messages)
Parameters
Type | Name | Description |
---|---|---|
ProtocolVersion | version | FIX protocol version. |
MessageInfo[] | messages | List of messages, belongs to this dictionary. |
Dictionary(ProtocolVersion, String)
Constructor.
Declaration
public Dictionary(ProtocolVersion version, string id)
Parameters
Type | Name | Description |
---|---|---|
ProtocolVersion | version | FIX protocol version. |
String | id | Dictionary id. |
Dictionary(ProtocolVersion, String, MessageInfo[])
Constructor.
Declaration
public Dictionary(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<UInt64, MessageInfo> |
Properties
Count
Gets the number of messages contained in the ICollection<T>.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
Int32 |
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 |
---|---|
Boolean |
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 |
---|---|
Boolean | 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 |
---|---|
Boolean | 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 |
---|---|
Boolean | true if message type is found in the ICollection<T>; otherwise, false. |
CopyTo(FieldTypeInfo[], Int32)
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. |
Int32 | arrayIndex | The zero-based index in array at which copying begins. |
CopyTo(MessageInfo[], Int32)
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. |
Int32 | arrayIndex | The zero-based index in array at which copying begins. |
Find(String)
Finds the Dictionary by the given Id in the Engine instance.
Note: the Engine should be initialized.
Declaration
public static Dictionary Find(string id)
Parameters
Type | Name | Description |
---|---|---|
String | id | Dictionary Id |
Returns
Type | Description |
---|---|
Dictionary | 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. |
GetMessageInfo(String)
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 |
---|---|
Boolean | 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 |
---|---|
Boolean | 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)
Declaration
public bool TryGetMessageInfo(ReadOnlySpan<byte> msgType, out MessageInfo info)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<Byte> | msgType | |
MessageInfo | info |
Returns
Type | Description |
---|---|
Boolean |
TryGetMessageInfo(String, out MessageInfo)
Returns message info that belongs to this FIX Specification
Declaration
public bool TryGetMessageInfo(string msgType, out MessageInfo info)
Parameters
Type | Name | Description |
---|---|---|
String | msgType | Type of message |
MessageInfo | info | 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 |
---|---|
Boolean | true if the Dictionary contains a message with the specified type; otherwise, false. |
Explicit Interface Implementations
IEnumerable<FieldTypeInfo>.GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
IEnumerator<FieldTypeInfo> IEnumerable<FieldTypeInfo>.GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<FieldTypeInfo> | An enumerator that can be used to iterate through the collection. |
IEnumerable.GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator | An IEnumerator object that can be used to iterate through the collection. |