Skip to content

Commit

Permalink
Merge pull request #838 from gbirchmeier/i639-SessionDictionary
Browse files Browse the repository at this point in the history
address #639 bug; rename Dictionary->SessionDict; cleanup/nullableize
  • Loading branch information
gbirchmeier authored Feb 16, 2024
2 parents a9433cf + 1ca1fb0 commit e317fdd
Show file tree
Hide file tree
Showing 29 changed files with 601 additions and 598 deletions.
8 changes: 4 additions & 4 deletions QuickFIXn/AbstractInitiator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void Start()
// create all sessions
foreach (SessionID sessionId in _settings.GetSessions())
{
Dictionary dict = _settings.Get(sessionId);
SettingsDictionary dict = _settings.Get(sessionId);
CreateSession(sessionId, dict);
}

Expand All @@ -72,7 +72,7 @@ public void Start()
/// <param name="sessionId">ID of new session</param>
/// <param name="dict">config settings for new session</param>
/// <returns>true if session added successfully, false if session already exists or is not an initiator</returns>
public bool AddSession(SessionID sessionId, Dictionary dict)
public bool AddSession(SessionID sessionId, SettingsDictionary dict)
{
lock (_settings)
if (!_settings.Has(sessionId)) // session won't be in settings if ad-hoc creation after startup
Expand All @@ -94,7 +94,7 @@ public bool AddSession(SessionID sessionId, Dictionary dict)
/// <param name="sessionId">ID of new session</param>
/// <param name="dict">config settings for new session</param>
/// <returns>true if session added successfully, false if session already exists or is not an initiator</returns>
private bool CreateSession(SessionID sessionId, Dictionary dict)
private bool CreateSession(SessionID sessionId, SettingsDictionary dict)
{
if (dict.GetString(SessionSettings.CONNECTION_TYPE) == "initiator" && !_sessionIDs.Contains(sessionId))
{
Expand Down Expand Up @@ -273,7 +273,7 @@ protected virtual void OnRemove(SessionID sessionId)
/// </summary>
/// <param name="session"></param>
/// <param name="settings"></param>
protected abstract void DoConnect(Session session, QuickFix.Dictionary settings);
protected abstract void DoConnect(Session session, QuickFix.SettingsDictionary settings);

#endregion

Expand Down
2 changes: 1 addition & 1 deletion QuickFIXn/AcceptorSocketDescriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ internal class AcceptorSocketDescriptor

#endregion

public AcceptorSocketDescriptor(IPEndPoint socketEndPoint, SocketSettings socketSettings, QuickFix.Dictionary sessionDict)
public AcceptorSocketDescriptor(IPEndPoint socketEndPoint, SocketSettings socketSettings, QuickFix.SettingsDictionary sessionDict)
{
Address = socketEndPoint;
SocketReactor = new ThreadedSocketReactor(Address, socketSettings, sessionDict, this);
Expand Down
2 changes: 1 addition & 1 deletion QuickFIXn/ClientHandlerThread.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public ExitedEventArgs(ClientHandlerThread clientHandlerThread)
private readonly SocketReader _socketReader;
private readonly FileLog _log;

internal ClientHandlerThread(TcpClient tcpClient, long clientId, QuickFix.Dictionary settingsDict,
internal ClientHandlerThread(TcpClient tcpClient, long clientId, QuickFix.SettingsDictionary settingsDict,
SocketSettings socketSettings, AcceptorSocketDescriptor? acceptorDescriptor)
{
string debugLogFilePath = "log";
Expand Down
292 changes: 0 additions & 292 deletions QuickFIXn/Dictionary.cs

This file was deleted.

2 changes: 1 addition & 1 deletion QuickFIXn/IAcceptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public interface IAcceptor : IDisposable
/// <param name="sessionID">ID of session to be added</param>
/// <param name="dict">session settings</param>
/// <returns>>true if session added successfully, false if session already exists or is not an acceptor</returns>
bool AddSession(SessionID sessionID, QuickFix.Dictionary dict);
bool AddSession(SessionID sessionID, QuickFix.SettingsDictionary dict);

/// <summary>
/// Remove an existing session after acceptor has been started
Expand Down
2 changes: 1 addition & 1 deletion QuickFIXn/IInitiator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public interface IInitiator : IDisposable
/// <param name="sessionID">ID of session to be added</param>
/// <param name="dict">session settings</param>
/// <returns>true if session added successfully, false if session already exists or is not an initiator</returns>
bool AddSession(SessionID sessionID, QuickFix.Dictionary dict);
bool AddSession(SessionID sessionID, QuickFix.SettingsDictionary dict);

/// <summary>
/// Remove an existing session after initiator has been started
Expand Down
2 changes: 1 addition & 1 deletion QuickFIXn/Logger/ScreenLogFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public ILog Create(SessionID sessionId) {

if(_settings.Has(sessionId))
{
Dictionary dict = _settings.Get(sessionId);
SettingsDictionary dict = _settings.Get(sessionId);
if (dict.Has(SCREEN_LOG_SHOW_INCOMING))
logIncoming = dict.GetBool(SCREEN_LOG_SHOW_INCOMING);
if (dict.Has(SCREEN_LOG_SHOW_OUTGOING))
Expand Down
Loading

0 comments on commit e317fdd

Please sign in to comment.