Migration Guide
OnixS .NET FIX Engine has almost the same API as OnixS .NET Framework Engine, but some identifiers were renamed to improve API usability, and a few superfluous methods were removed.
Sections below describe major changes.
NLog Based Engine-level Logging
Please see Logging Services.
Dialect
is renamed to Dictionary
The Dialect
class is renamed to MessageInfoDictionary.
Now MessageInfoDictionary can also be created programmatically.
Finding Session-level Dictionaries
To find the session-level dictionary that was created during the Engine initialization use the Find(string) method.
For example:
Dialect fixVariant = new Dialect("Custom FIX");
should be replaced with
IMessageInfoDictionary fixVariant = MessageInfoDictionary.Find("Custom FIX");
See Also
Different semantic of Set(Int32, Decimal, Int32)
and Set(Int32, Double, Int32)
methods
In the Set(int, decimal, int), Set(int, double, int), Set(int, int, decimal, int)>, and Set(int, int, double, int)> methods the precision
argument specifies the desired number of decimal places.
Different behavior of Set(..)
methods
The value
argument cannot be null
in the IFieldSet.Set(..)
methods. The NullReferenceException
exception is thrown when it is null
.
Renamed Namespaces
Old | New |
---|---|
Fixforge.NET.FIX |
OnixS.Fix |
Fixforge.NET.FIX40 |
OnixS.Fix.Fix40 |
Fixforge.NET.FIX41 |
OnixS.Fix.Fix41 |
Fixforge.NET.FIX42 |
OnixS.Fix.Fix42 |
Fixforge.NET.FIX43 |
OnixS.Fix.Fix43 |
Fixforge.NET.FIX44 |
OnixS.Fix.Fix44 |
Fixforge.NET.FIX50 |
OnixS.Fix.Fix50 |
Fixforge.NET.FIX50_SP1 |
OnixS.Fix.Fix50sp1 |
Fixforge.NET.FIX50_SP2 |
OnixS.Fix.Fix50sp2 |
Renamed Classes
Old | New |
---|---|
Dialect |
MessageInfoDictionary |
Engine.ErrorEventArgs |
EngineErrorEventArgs |
Engine.UnknownIncomingConnectionEventArgs |
UnknownIncomingConnectionEventArgs |
Engine.WarningEventArgs |
EngineWarningEventArgs |
InboundApplicationMsgEventArgs |
InboundMessageEventArgs |
InboundSessionMsgEventArgs |
InboundMessageEventArgs |
OutboundApplicationMsgEventArgs |
MessageEventArgs |
OutboundSessionMsgEventArgs |
MessageEventArgs |
Tags |
Tag |
TimeoutException |
LogonReplyTimeoutException |
Renamed Methods
Old | New |
---|---|
FieldSet.Contain |
Contains(int) |
FieldSet.GetByteArray |
GetBytes(int) |
FieldSet.TryGetByteArray |
TryGetBytes(int, out byte[]) |
Message.ToRawFixString |
ToString() |
Message.CopyTo |
ToBytes(Span<byte>) |
Renamed Properties
Old | New |
---|---|
Engine.Dialects |
MessageInfoDictionaryManager |
EngineSettings.Dialect |
Dictionary |
EngineSettings.DialectString |
DictionaryString |
EngineSettings.LogDirectory |
StorageDirectory |
EngineSettings.ProcessDeliverToCompID |
ProcessDeliverToCompId |
EngineSettings.SpecifyApplVerIdField |
SetApplVerId |
EngineSettings.SslCaFile |
CaFile |
EngineSettings.SslCertificateFile |
CertificateLocation |
EngineSettings.SslListenPorts |
ListenPorts |
EngineSettings.SslPrivateKeyPassword |
PrivateKeyPassword |
EngineSettings.SslVerifyPeer |
VerifyPeer |
EngineSettings.TcpNoDelayOption |
TcpNoDelay |
EngineSettings.ValidateRepeatingGroupLeadingTag |
ValidateRepeatingGroupLeadingField |
FieldSet.Fields |
GetFields() |
Message.SenderCompID |
SenderCompId |
Message.TargetCompID |
TargetCompId |
Session.Dialect |
Dictionary |
Session.LocalInterface |
LocalNetworkInterface |
MessageResendingEventArgs.Msg |
Message |
Session.SenderCompID |
SenderCompId |
Session.SenderSubID |
SenderSubId |
Session.SpecifyLastMsgSeqNumProcessedField |
SetLastMsgSeqNumProcessed |
Session.StorageID |
StorageId |
Session.TargetCompID |
TargetCompId |
Session.TargetSubID |
TargetSubId |
Session.TcpNoDelayOption |
TcpNoDelay |
Session.UpdateSendingTimeField |
UpdateSendingTime |
Session.ReuseIncomingMessage |
ReuseInboundMessage |
Session.ValidateRepeatingGroupLeadingTag |
ValidateRepeatingGroupLeadingField |
Renamed Events
Old | New |
---|---|
Session.ErrorEvent |
Error |
Session.InboundApplicationMsgEvent |
InboundApplicationMessage |
Session.InboundSessionMsgEvent |
InboundSessionMessage |
Session.OutboundApplicationMsgEvent |
OutboundApplicationMessage |
Session.OutboundSessionMsgEvent |
OutboundSessionMessage |
Session.StateChangeEvent |
StateChanged |
Session.WarningEvent |
Warning |
Renamed Enumerations
Old | New |
---|---|
Engine.ErrorReason |
EngineErrorReason |
Engine.WarningReason |
EngineWarningReason |
Message.StringFormat |
FixStringFormat |
Message.MessageParsingFlags |
MessageValidationFlags |
Session.ErrorReason |
SessionErrorReason |
Session.WarningReason |
SessionWarningReason |
Renamed Enumerations Values
Some enumerations values were renamed and all values were converted to the standard .NET type-naming ("PascalCasing"). For example:
Old | New |
---|---|
ProtocolVersion.FIX40 |
Fix40 |
ProtocolVersion.FIX41 |
Fix41 |
ProtocolVersion.FIX42 |
Fix42 |
ProtocolVersion.FIX43 |
Fix43 |
ProtocolVersion.FIX44 |
Fix44 |
ProtocolVersion.FIX50 |
Fix50 |
ProtocolVersion.FIX50_SP1 |
Fix50sp1 |
ProtocolVersion.FIX50_SP1 |
Fix50sp2 |
SessionState.DISCONNECTED |
Disconnected |
SessionState.LOGON_IN_PROGRESS |
AwaitLogon |
SessionState.ACTIVE |
Established |
SessionState.RECONNECTING |
Reconnecting |
SessionState.LOGOUT_IN_PROGRESS |
AwaitConfirmingLogout |
Removed Constructors
Old | Comments |
---|---|
Dialect(String) |
Use Find(string) |
Message(String) |
Use Parse(string, MessageValidationFlags, MessageMemoryPool) |
Removed Methods
Old | Comments |
---|---|
Dialect.GetFieldValueDescription(int tag, string value) |
Use (dictionary as IReadOnlyCollection<MessageInfo>).SelectMany(m => m.Fields).Where(f => f.Tag == tag).Select(f => f.Type.Values).First()[value].Description |
Dialect.GetMessageFields(string type) |
Use (dictionary as IReadOnlyCollection<MessageInfo>).Where(m => m.Type == type).First().Fields |
Dialect.GetValidFieldValues(int tag) |
Use (dictionary as IReadOnlyCollection<MessageInfo>).SelectMany(m => m.Fields).Where(f => f.Tag == tag).Select(f => f.Type.Values).First().Values.ToArray() |
Dialect.MessageNameByType(string type) |
Use (dictionary as IReadOnlyCollection<MessageInfo>).Where(m => m.Type == type).Select(m => m.Name).FirstOrDefault() |
Dialect.TagNameByNumber(int tag) |
Use (dictionary as IReadOnlyCollection<MessageInfo>).SelectMany(m => m.Fields).Where(f => f.Tag == tag).Select(f => f.Name).FirstOrDefault() |
Dialect.TagNumberByName(string name) |
Use (dictionary as IReadOnlyCollection<MessageInfo>).SelectMany(m => m.Fields).Where(f => f.Name == name).Select(f => f.Tag).FirstOrDefault() |
Message.Dispose() |
Removed Properties
Old | Comments |
---|---|
EngineSetting.LicenseFile |
Use LicenseStore |
Dialect.MessageTypes |
Use dictionary.Messages.Values.Select(m => m.Type) |
Dialect.Tags |
Use dictionary.Messages.Values.SelectMany(m => m.Fields).Select(f => f.Tag).Distinct().ToArray() |
OutboundApplicationMsgEventArgs.ModifiedMsg |
See Modifying Outgoing Messages |
OutboundSessionMsgEventArgs.ModifiedMsg |
See Modifying Outgoing Messages |
Methods Changed To Properties
Old | New |
---|---|
Engine.IsInitialized |
IsInitialized |