`

    using QuickFix;

    class MyClass
    {
      static void Main(string[] args)
      {
        if(args.Length != 1) return;
        String fileName = args[0];

        try
        {
          SessionSettings settings = new SessionSettings(fileName);
          Application application = new MyApplication();
          FileStoreFactory storeFactory = new FileStoreFactory(settings);
          FileLogFactory logFactory = new FileLogFactory(settings);
          MessageFactory messageFactory = new DefaultMessageFactory();
          SocketAcceptor acceptor = new SocketAcceptor
            (application, storeFactory, settings, logFactory /*optional*/, messageFactory);
          acceptor.start();
          // while( condition == true ) { do something; }
          acceptor.stop();
        }
        catch(ConfigError e)
        {
          Console.WriteLine(e);
        }
      }
    }

`