protected override JsonCommand DoExecute(string args)
        {
            // TODO: 这里是使用 换行符, 建立处理
            string[] arr = args.Split('\n');
            foreach (string arg in arr)
            {
                int    idx1 = arg.IndexOf(',');
                string p1   = arg.Substring(0, idx1);
                string p2   = arg.Substring(idx1 + 1);

                CommandDirective  direct           = EnumHelper.ToEnum <CommandDirective>(int.Parse(p1));
                JsonCommand       req              = JsonCommands.OK(direct, p2);
                ICommand <string> commandProcessor = CommandProcessorFactory.GetProcessor(direct);
                JsonCommand       dr = commandProcessor.Execute(req);
                // TODO:
            }

            return(null);
        }
예제 #2
0
        public void AfterPropertiesSet()
        {
            logger.DebugFormat("Register Command#{0}", this);

            CommandProcessorFactory.Register(this);
        }