public void Run()
        {
            byte[] b = new byte[500];
            String s;

            while (true)
            {
                System.Console.Write(">");
                try
                {
                    s = System.Console.ReadLine();
                    if (s.Length == 0)
                    {
                        continue;
                    }
                    String[] cmd = ParseCommand(s);
                    if (cmd[0].Equals("exit", StringComparison.OrdinalIgnoreCase))
                    {
                        break;
                    }
                    if (cmd[0].Equals("help", StringComparison.OrdinalIgnoreCase))
                    {
                        System.Console.WriteLine();
                        System.Console.WriteLine("exit - exits from the application");
                        Commands.getInstance().writeShortHelp();
                        System.Console.WriteLine();
                        continue;
                    }

                    Command command = Commands.getInstance().getCommand(cmd[0]);
                    if (command != null)
                    {
                        if (command.execute(rc, cmd))
                        {
                            System.Console.WriteLine("OK");
                        }
                        else
                        {
                            System.Console.WriteLine("NOK");
                        }
                    }
                    else
                    {
                        System.Console.WriteLine("Unknown command: " + cmd[0]);
                    }
                }
                catch (System.Exception ex)
                {
                    System.Console.WriteLine("Exception: " + ex + ex.Message);
                }
            }

            rc.R_Close();
            Trace("R_Close succeeded");
        }
        public void AllClear(ReconCOM rc, string userName)
        {
            string msg = string.Empty;

            VCLogServiceHelper.Instance.StopRecord(userName, string.Empty, ref msg);
            VCLogServiceHelper.Instance.AgentLogout(userName, ref msg);
            //rc.T_AgentLogOff(userName, userName);
            int iRet = 0;

            //rc.CS_Login(userName, userName);
            AgentLogOff(rc, userName);
            iRet = rc.CS_Logout();
            Loger.Log4Net.Info("[CarolHelper]AllClear...rc.CS_Logout()...iRet is:" + iRet);
            rc.R_Close();
        }