public static void Main(string[] args) { HeartbeatClient loginClient = new HeartbeatClient(); if (args.Length != 4) { Console.WriteLine("Usage " + loginClient.GetType().Name + " <url> <username> <password> [CFD_DEMO|CFD_LIVE]"); Environment.Exit(-1); } String url = args[0]; String username = args[1]; String password = args[2]; ProductType productType = (ProductType)Enum.Parse(typeof(ProductType), args[3].ToUpper()); LmaxApi lmaxApi = new LmaxApi(url); lmaxApi.Login(new LoginRequest(username, password, productType), loginClient.OnLoginSuccess, FailureCallback("log in")); }