### Generate SSL Keys with GenerateKeys App Source: https://github.com/connamara/quickfixn/blob/master/Examples/README.md Demonstrates how to use the GenerateKeys application to create necessary certificates for SSL configurations. These certificates are required for running examples with `*_ssl.cfg` files. ```csharp ~/quickfixn/GenerateKeys$ dotnet run ../Examples/ Writing CACertificate: ../Examples/QuickFixn-TestCA.cer Writing ServerCertificate: ../Examples/QuickFixn-TestServer.pfx Writing ClientCertificate: ../Examples/QuickFixn-TestClient.pfx ``` -------------------------------- ### Run GenerateKeys Application Source: https://github.com/connamara/quickfixn/blob/master/GenerateKeys/README.md Execute the GenerateKeys application using dotnet run, providing the path to the Examples directory. This command generates the necessary SSL certificate files. ```bash ~/quickfixn/GenerateKeys$ dotnet run ../Examples/ Writing CACertificate: ../Examples/QuickFixn-TestCA.cer Writing ServerCertificate: ../Examples/QuickFixn-TestServer.pfx Writing ClientCertificate: ../Examples/QuickFixn-TestClient.pfx ``` -------------------------------- ### Build QuickFIX/n Project Source: https://github.com/connamara/quickfixn/blob/master/README.md Standard .NET CLI command to compile the QuickFIX/n project. Assumes .NET 8 or later. ```bash dotnet build ``` -------------------------------- ### Run All QuickFIX/n Tests Source: https://github.com/connamara/quickfixn/blob/master/README.md Execute all unit and acceptance tests for QuickFIX/n using the .NET CLI. Tests are typically run using NUnit. ```bash dotnet test ``` -------------------------------- ### Detailed Test Output with .NET CLI Source: https://github.com/connamara/quickfixn/blob/master/README.md Run QuickFIX/n tests with detailed console output for better debugging. Useful for acceptance tests. ```bash dotnet test -l "console;verbosity=detailed" AcceptanceTest ``` -------------------------------- ### Extract Custom Settings from QuickFIX/n Config File Source: https://github.com/connamara/quickfixn/wiki/User-FAQ This C# code demonstrates how to iterate through sessions defined in a QuickFIX/n settings file and extract custom settings like 'Woot'. Ensure the settings file is correctly loaded. ```csharp // Create object from file that you supply QuickFix.SessionSettings settings = new QuickFix.SessionSettings(file); // Get all the session IDs HashSet sids = settings.GetSessions(); // For each session ID, get the session's settings and look for "Woot" key foreach (SessionID sid in sids) { Console.WriteLine("==SessionID: " + sid.ToString()+"=="); Dictionary settingsDict = settings.Get(sid); if (settingsDict.Has("Woot")) Console.WriteLine("Woot=" + settingsDict.GetString("Woot")); else Console.WriteLine("Does not have Woot"); } ``` -------------------------------- ### Run Specific QuickFIX/n Acceptance Tests Source: https://github.com/connamara/quickfixn/blob/master/README.md Command to run only the acceptance tests for the QuickFIX/n project. Specify the test project name. ```bash dotnet test AcceptanceTests ``` -------------------------------- ### Run DDTool to Parse and Generate Code Source: https://github.com/connamara/quickfixn/blob/master/DDTool/README.md This command parses DataDictionary files and generates code. Specify the QuickFIX/n repository root and the destination directory for the generated output, along with the paths to the DD files. ```bash dotnet run --project DDTool --reporoot --outputdir ... ``` -------------------------------- ### Run Specific QuickFIX/n Unit Tests Source: https://github.com/connamara/quickfixn/blob/master/README.md Command to run only the unit tests for the QuickFIX/n project. Specify the test project name. ```bash dotnet test UnitTests ``` -------------------------------- ### Add Username/Password to Logon Message in QuickFIX/n Source: https://github.com/connamara/quickfixn/wiki/User-FAQ Implement this logic within the ToAdmin method of your IApplication to set username and password fields in the Logon message. ```csharp public void ToAdmin(Message message, SessionID sessionID) { if(message.Header.GetField(Tags.MsgType)==MsgType.LOGON){ message.SetField(new QuickFix.Fields.Username("batman")); message.SetField(new QuickFix.Fields.Password("gotham123")); } } ``` -------------------------------- ### Create QuickFIX/n Message Object from Raw FIX String Source: https://github.com/connamara/quickfixn/wiki/User-FAQ Use the Message.FromString() method to parse a raw FIX string into a QuickFIX/n Message object. A DataDictionary is required for proper parsing, especially with repeating groups. ```csharp string msgStr = var dd = new QuickFix.DataDictionary.DataDictionary(); dd.Load("some/path/FIX44.xml"); // or whatever file IMessageFactory defaultMsgFactory = new DefaultMessageFactory(); var msg = new QuickFix.FIX44.ExecutionReport(); msg.FromString(msgStr,true,dd,dd,defaultMsgFactory); ``` -------------------------------- ### Run DDTool to Analyze DataDictionaries Source: https://github.com/connamara/quickfixn/blob/master/DDTool/README.md Use this command to parse DataDictionary files and perform analysis without generating code. Ensure you provide the path to the DD files. ```bash dotnet run --project DDTool ... ``` -------------------------------- ### Generate QuickFIX/n Message Sources Source: https://github.com/connamara/quickfixn/blob/master/README.md Use this Powershell script to analyze DataDictionary files and regenerate message and field source code for QuickFIX/n. ```powershell pwsh scripts\Generate-Message-Sources.ps1 ``` -------------------------------- ### Filter QuickFIX/n Tests by Name Source: https://github.com/connamara/quickfixn/blob/master/README.md Use the --filter option with the .NET CLI to run specific QuickFIX/n test suites, identified by their TestCaseSource. ```bash dotnet test --filter Fix44Test AcceptanceTest ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.