Esempio n. 1
0
        public void AgentCommandRegisterTest1()
        {
            Utility.Command command  = new Utility.Command();
            int             regCount = 0;

            command.RegisterEvent += (cmd, ret, args) =>
            {
                regCount++;
            };
            int unregCount = 0;

            command.UnregisterEvent += (cmd) =>
            {
                unregCount++;
            };
            Remote.Client.AgentCommandRegister agentCommandRegister = new Remote.Client.AgentCommandRegister(command, new Remote.Client.TypeConverterSet());

            CType test = new CType(1);

            agentCommandRegister.Regist(typeof(IType), test);
            agentCommandRegister.Unregist(test);

            Assert.Equal(2, regCount);
            Assert.Equal(2, unregCount);
        }
Esempio n. 2
0
 public StageRun(Regulus.Game.ICore core,Utility.Command command,int port , Utility.Console.IViewer viewer)
 {
     _View = viewer;
     this._Command = command;
     _ThreadSocketHandler = new ThreadSocketHandler(port, core);
     _ThreadSocket = new System.Threading.Thread(_ThreadSocketHandler.DoWork);
 }