static void Main(string[] args)
{
Console.WriteLine("=============");
Console.WriteLine("This is only an example program, meant to be used with the TradeClient example.");
Console.WriteLine("=============");
if (args.Length != 1)
{
Console.WriteLine("usage: Executor CONFIG_FILENAME");
System.Environment.Exit(2);
}
try
{
SessionSettings settings = new SessionSettings(args[0]);
IApplication executorApp = new Executor();
IMessageStoreFactory storeFactory = new FileStoreFactory(settings);
ILogFactory logFactory = new FileLogFactory(settings);
ThreadedSocketAcceptor acceptor = new ThreadedSocketAcceptor(executorApp, storeFactory, settings, logFactory);
acceptor.Start();
Console.WriteLine("press <enter> to quit");
Console.Read();
acceptor.Stop();
}
catch (System.Exception e)
{
Console.WriteLine("==FATAL ERROR==");
Console.WriteLine(e.ToString());
}
}