Skip to content

Commit

Permalink
delete namesp prefix: QuickFix.SettingisDictionary
Browse files Browse the repository at this point in the history
no longer needed after I renamed
QuickFix.Dictionary to QuickFix.SettingsDictionary

This commit makes no other changes to these files
  • Loading branch information
gbirchmeier committed Jun 7, 2024
1 parent 5ddb532 commit e8bd11c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions QuickFIXn/SessionFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public SessionFactory(
_messageFactory = messageFactory ?? new DefaultMessageFactory();
}

private static bool DetectIfInitiator(QuickFix.SettingsDictionary settings)
private static bool DetectIfInitiator(SettingsDictionary settings)
{
switch (settings.GetString(SessionSettings.CONNECTION_TYPE))
{
Expand All @@ -46,7 +46,7 @@ private static bool DetectIfInitiator(QuickFix.SettingsDictionary settings)
throw new ConfigError("Invalid ConnectionType");
}

public Session Create(SessionID sessionId, QuickFix.SettingsDictionary settings)
public Session Create(SessionID sessionId, SettingsDictionary settings)
{
bool isInitiator = SessionFactory.DetectIfInitiator(settings);

Expand Down Expand Up @@ -161,7 +161,7 @@ public Session Create(SessionID sessionId, QuickFix.SettingsDictionary settings)
return session;
}

protected DataDictionary.DataDictionary CreateDataDictionary(SessionID sessionId, QuickFix.SettingsDictionary settings, string settingsKey, string beginString)
protected DataDictionary.DataDictionary CreateDataDictionary(SessionID sessionId, SettingsDictionary settings, string settingsKey, string beginString)
{
string path;
if (settings.Has(settingsKey))
Expand Down
14 changes: 7 additions & 7 deletions QuickFIXn/SessionSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public bool Has(SessionID sessionId)
/// Get global default settings
/// </summary>
/// <returns>Dictionary of settings from the [DEFAULT] section</returns>
public QuickFix.SettingsDictionary Get()
public SettingsDictionary Get()
{
return _defaults;
}
Expand All @@ -179,10 +179,10 @@ public SettingsDictionary Get(SessionID sessionId)
return dict;
}

public void Set(QuickFix.SettingsDictionary defaults)
public void Set(SettingsDictionary defaults)
{
_defaults = defaults;
foreach (KeyValuePair<SessionID, QuickFix.SettingsDictionary> entry in _settings)
foreach (KeyValuePair<SessionID, SettingsDictionary> entry in _settings)
entry.Value.Merge(_defaults);
}

Expand All @@ -201,7 +201,7 @@ public bool Remove(SessionID sessionId)
/// </summary>
/// <param name="sessionId">ID of session for which to add config</param>
/// <param name="settings">session config</param>
public void Set(SessionID sessionId, QuickFix.SettingsDictionary settings)
public void Set(SessionID sessionId, SettingsDictionary settings)
{
if (Has(sessionId))
throw new ConfigError($"Duplicate Session {sessionId}");
Expand All @@ -224,7 +224,7 @@ public void Set(SessionID sessionId, QuickFix.SettingsDictionary settings)
public HashSet<SessionID> GetSessions()
{
HashSet<SessionID> result = new HashSet<SessionID>();
foreach (KeyValuePair<SessionID, QuickFix.SettingsDictionary> entry in _settings)
foreach (KeyValuePair<SessionID, SettingsDictionary> entry in _settings)
result.Add(entry.Key);
return result;
}
Expand All @@ -237,7 +237,7 @@ public override string ToString()
foreach (System.Collections.Generic.KeyValuePair<string, string> entry in _defaults)
s.Append(entry.Key).Append('=').AppendLine(entry.Value);

foreach (KeyValuePair<SessionID, QuickFix.SettingsDictionary> entry in _settings)
foreach (KeyValuePair<SessionID, SettingsDictionary> entry in _settings)
{
s.AppendLine().AppendLine("[SESSION]");
foreach (System.Collections.Generic.KeyValuePair<string, string> kvp in entry.Value)
Expand All @@ -251,7 +251,7 @@ public override string ToString()
return s.ToString();
}

protected void Validate(QuickFix.SettingsDictionary settingsDictionary)
protected void Validate(SettingsDictionary settingsDictionary)
{
string beginString = settingsDictionary.GetString(BEGINSTRING);
if (beginString != Values.BeginString_FIX40 &&
Expand Down
12 changes: 6 additions & 6 deletions QuickFIXn/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ namespace QuickFix
{
public class Settings
{
private readonly LinkedList<QuickFix.SettingsDictionary> _sections = new();
private readonly LinkedList<SettingsDictionary> _sections = new();

public Settings(System.IO.TextReader conf)
{
QuickFix.SettingsDictionary? currentSection = null;
SettingsDictionary? currentSection = null;

string? line;
while ((line = conf.ReadLine()) != null)
Expand Down Expand Up @@ -61,7 +61,7 @@ public static bool IsSection(string s)
return s[0] == '[' && s[^1] == ']';
}

public QuickFix.SettingsDictionary Add(QuickFix.SettingsDictionary section)
public SettingsDictionary Add(SettingsDictionary section)
{
_sections.AddLast(section);
return section;
Expand All @@ -73,10 +73,10 @@ public QuickFix.SettingsDictionary Add(QuickFix.SettingsDictionary section)
/// </summary>
/// <param name="sectionName">(case is ignored)</param>
/// <returns></returns>
public LinkedList<QuickFix.SettingsDictionary> Get(string sectionName)
public LinkedList<SettingsDictionary> Get(string sectionName)
{
LinkedList<QuickFix.SettingsDictionary> result = new();
foreach (QuickFix.SettingsDictionary dict in _sections)
LinkedList<SettingsDictionary> result = new();
foreach (SettingsDictionary dict in _sections)
if (sectionName.ToUpperInvariant() == dict.Name.ToUpperInvariant())
result.AddLast(dict);
return result;
Expand Down
2 changes: 1 addition & 1 deletion QuickFIXn/Transport/SocketInitiator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ private void RemoveThread(SessionID sessionId)
}
}

private IPEndPoint GetNextSocketEndPoint(SessionID sessionId, QuickFix.SettingsDictionary settings)
private IPEndPoint GetNextSocketEndPoint(SessionID sessionId, SettingsDictionary settings)
{
if (!_sessionToHostNum.TryGetValue(sessionId, out var num))
num = 0;
Expand Down

0 comments on commit e8bd11c

Please sign in to comment.