Create a new blank solution named Sandfield.Messaging.CustomRoutes.<SystemName>
Create a new folder in the repo called src
Add a new project under the solution
Class Library (.NET Framework)
with the same name as the solution
in the Source folder
 using .NET Framework 4.8.1
Add another new project under the solution
Console App (.NET Framework) - set this as the startup project for testing.
Named Sandfield.Messaging.CustomRoutes.<SystemName>.TestHarness
in the Source folder
using .NET Framework 4.8.1
Add a reference to the Sandfield.Messaging DLL
Can find this DLL in the Engine folder.
Copy the Sandfield.Messaging DLL config here:
\Source\Sandfield.Messaging.Addin.<SystemName>.TestHarness\bin\Debug\Sandfield.Messaging.dll.config
Can find this DLL in the folder of any transport inside the engine folder.
Under the first project, create an implementation of Sandfield.Messaging.Interfaces.IRouteMessage.
CustomMatch should return true if the custom route is capable of handling the incoming message that was passed as a parameter, and false otherwise.
CustomRoute should return the outgoing message, when passed the incoming message as a parameter.
You'll mostly want to work with message.TextBody and message.Attachments .
Write the main method in program.cs to instantiate the Route and pass it a test message.
To deploy your route, build the Sandfield.Messaging.CustomRoutes.<SystemName> project, then copy the contents of the bin\Debug folder into a new folder (named Sandfield.Messaging.CustomRoutes.<SystemName>) inside the CustomRoutes folder in the Engine folder on the server. If this is the first time you're deploying, you should not be prompted to overwrite files. Each custom route should be deployed to a new empty folder.
Overwriting these files for updates will require turning the scheduling service off. Please back up the route files you're overwriting to an appropriately dated folder in the Backup folder, which is in the same parent folder as the engine folder.
Then you can configure a route in Crossfire to use your code using these settings on the route's page: