Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into ordinal
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob-Hague committed Dec 21, 2023
2 parents 9ee132f + 21a4e85 commit 00934e5
Show file tree
Hide file tree
Showing 1,164 changed files with 1,261,145 additions and 1,179,881 deletions.
30 changes: 21 additions & 9 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
# Make all the C# source be crlf
generator/*rb text eol=crlf
*.cs text eol=crlf
*.bat text eol=crlf
*.csproj text eol=crlf
*.sln text eol=crlf
*.cfg text
*.pfx binary
*.cer binary
# Auto detect text files and perform LF normalization
* text=auto

*.bat text
*.cer binary
*.cfg text
*.cs text
*.csproj text
*.def text
*.erb text
*.fmt text
*.md text
*.pfx binary
*.ps1 text
*.rb text
*.sln text
*.txt text
*.xml text
*.xsl text
*.yml text

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ upload_to_s3.rb
*.suo
.vs/
.vscode/
tmp/

# ReSharper is a .NET coding add-in
_ReSharper*/
Expand Down Expand Up @@ -164,3 +165,8 @@ FakesAssemblies/

# JetBrains Rider
.idea

# stuff from the gh-pages branch I guess
.sass-cache/
_site/

15 changes: 0 additions & 15 deletions .slugignore

This file was deleted.

13 changes: 13 additions & 0 deletions AcceptanceTest/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[*.cs]

# NUnit2003: Consider using Assert.That(expr, Is.True) instead of Assert.IsTrue(expr)
dotnet_diagnostic.NUnit2003.severity = silent

# NUnit2005: Consider using Assert.That(actual, Is.EqualTo(expected)) instead of Assert.AreEqual(expected, actual)
dotnet_diagnostic.NUnit2005.severity = silent

# NUnit2017: Consider using Assert.That(expr, Is.Null) instead of Assert.IsNull(expr)
dotnet_diagnostic.NUnit2017.severity = silent

# NUnit2019: Consider using Assert.That(expr, Is.Not.Null) instead of Assert.IsNotNull(expr)
dotnet_diagnostic.NUnit2019.severity = silent
1 change: 0 additions & 1 deletion AcceptanceTest/.gitignore

This file was deleted.

29 changes: 13 additions & 16 deletions AcceptanceTest/ATApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ namespace AcceptanceTest
{
public class ATApplication : MessageCracker, IApplication
{
public event System.Action StopMeEvent;
public event System.Action? StopMeEvent;

private HashSet<KeyValuePair<string, SessionID>> clOrdIDs_ = new HashSet<KeyValuePair<string, SessionID>>();
private FileLog log_;
private readonly HashSet<KeyValuePair<string, SessionID>> _clOrdIDs = new();

public ATApplication(FileLog debugLog)
public ATApplication()
{
log_ = debugLog;
}

public void OnMessage(QuickFix.FIX40.NewOrderSingle nos, SessionID sessionID)
Expand Down Expand Up @@ -92,22 +90,22 @@ public void OnMessage(QuickFix.FIX50SP2.SecurityDefinition message, SessionID se

protected void Echo(Message message, SessionID sessionID)
{
Message echo = new Message(message);
Message echo = new(message);
Session.SendToTarget(echo, sessionID);
}

protected void ProcessNOS(Message message, SessionID sessionID)
{
Message echo = new Message(message);
Message echo = new(message);

bool possResend = false;
if (message.Header.IsSetField(QuickFix.Fields.Tags.PossResend))
possResend = message.Header.GetBoolean(QuickFix.Fields.Tags.PossResend);

KeyValuePair<string, SessionID> pair = new KeyValuePair<string, SessionID>(message.GetString(QuickFix.Fields.Tags.ClOrdID), sessionID);
if (possResend && clOrdIDs_.Contains(pair))
KeyValuePair<string, SessionID> pair = new(message.GetString(QuickFix.Fields.Tags.ClOrdID), sessionID);
if (possResend && _clOrdIDs.Contains(pair))
return;
clOrdIDs_.Add(pair);
_clOrdIDs.Add(pair);

Session.SendToTarget(echo, sessionID);
}
Expand All @@ -121,7 +119,7 @@ protected void ProcessNOS(Message message, SessionID sessionID)
public void OnMessage(QuickFix.FIX50SP1.News news, SessionID sessionID) { ProcessNews(news, sessionID); }
public void OnMessage(QuickFix.FIX50SP2.News news, SessionID sessionID) { ProcessNews(news, sessionID); }

public void ProcessNews(QuickFix.Message msg, SessionID sessionID)
public void ProcessNews(Message msg, SessionID sessionID)
{
if (msg.IsSetField(QuickFix.Fields.Tags.Headline) && (msg.GetString(QuickFix.Fields.Tags.Headline) == "STOPME"))
{
Expand All @@ -144,13 +142,12 @@ public void OnCreate(SessionID sessionID)
Session session = Session.LookupSession(sessionID);

// Hey QF/N users, don't do this in a real app.
if (null != session)
session.Reset("AT Session Reset");
session?.Reset("AT Session Reset");
}

public void OnLogout(SessionID sessionID)
{
clOrdIDs_.Clear();
_clOrdIDs.Clear();
}

public void OnLogon(SessionID sessionID)
Expand All @@ -166,13 +163,13 @@ public void FromApp(Message message, SessionID sessionID)

Crack(message, sessionID);
}
catch (QuickFix.UnsupportedMessageType)
catch (UnsupportedMessageType)
{
throw;
}
catch (System.Exception e)
{
log_.OnEvent("FromApp: " + e.ToString() + " while processing msg (" + message.ToString() + ")");
Session.LookupSession(sessionID).Log.OnEvent("Exception during FromApp: " + e.ToString() + "\n while processing msg (" + message.ToString() + ")");
}
}

Expand Down
64 changes: 0 additions & 64 deletions AcceptanceTest/ATRunner.cs

This file was deleted.

22 changes: 18 additions & 4 deletions AcceptanceTest/AcceptanceTest.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0</TargetFrameworks>
<Platforms>AnyCPU;x64</Platforms>
<TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" />
<PackageReference Include="NUnit.Analyzers" Version="3.6.1" />
<PackageReference Include="coverlet.collector" Version="3.2.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Messages\FIX40\QuickFix.FIX40.csproj" />
<ProjectReference Include="..\Messages\FIX41\QuickFix.FIX41.csproj" />
Expand All @@ -19,4 +27,10 @@
<ProjectReference Include="..\QuickFIXn\QuickFix.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="cfg\**" CopyToOutputDirectory="PreserveNewest" />
<None Include="definitions\**" CopyToOutputDirectory="PreserveNewest" />
<None Include="..\spec\**" CopyToOutputDirectory="PreserveNewest" LinkBase="spec" />
</ItemGroup>

</Project>
72 changes: 0 additions & 72 deletions AcceptanceTest/Comparator.rb

This file was deleted.

37 changes: 0 additions & 37 deletions AcceptanceTest/ComparatorTestCase.rb

This file was deleted.

Loading

0 comments on commit 00934e5

Please sign in to comment.