示例#1
0
        static void Main(string[] args)
        {
            Console.BackgroundColor = ConsoleColor.Black;
            Console.ForegroundColor = ConsoleColor.Green;

            CmdController.Execute();
        }
示例#2
0
        public void TestCmdController()
        {
            CmdController aController = new CmdController();
            CmdRecord     aRecord     = new CmdRecord()
            {
                CmdId = "TestCmd", Time = DateTime.Now, Value = ""
            };
            Func <string, ErrInfo> aCmd = TestSetOk;

            aController.Add(aRecord, aCmd);

            TestSetOk("");
        }
示例#3
0
文件: Program.cs 项目: nistec/MQueue
        static void RunTest()
        {
            Nistec.Channels.NetProtocol netprotocol = Nistec.Channels.NetProtocol.Tcp;

            do
            {
                Console.WriteLine("start...protocol: " + netprotocol.ToString());
                string protocol = Console.ReadLine();
                if (protocol != null && protocol.Length > 0)
                {
                    netprotocol = protocol == "pipe" ? Nistec.Channels.NetProtocol.Pipe : Nistec.Channels.NetProtocol.Tcp;
                }
                if (Controller.EnableJsonController)
                {
                    CmdController.DoCommandSyncJson(netprotocol, "printentityvalues", "contactEntity", "", "");
                }
                else
                {
                    CmdController.DoCommandSync(netprotocol, "printentityvalues", "contactEntity", "", "", "");
                }
                Console.WriteLine("end...");
            } while (Console.ReadLine() != "q");
        }
示例#4
0
        public string FulfillRequestTo(string request, Player ofP)
        {
            CmdController manager = new CmdController(request);

            return(manager.ExeCmd(ofP));
        }