public static void ResponceGenerator(FlexEvent flx, Requester.Result result)
        {
            var command = flx.Arguments.ContainsKey(ArgCommandName) ? (string)flx.Arguments[ArgCommandName] : "";
            var fex = CreateRespFex(flx);
            var count = 0;
            foreach (var collumn in result.ResultData)
            {
                fex.AddComplexArg(collumn.Key,collumn.Value);

                if (count == 0) {
                    foreach (var row in collumn.Value) {
                        count++;
                    }
                }
            }
            foreach (var argument in flx.Arguments) {
                if (!argument.Key.StartsWith("@")) {
                    fex.AddArg(String.Format("<{0}>",argument.Key), argument.Value);
                }
            }
            fex.AddArg(ArgCountName,count);
            fex.AddArg(ArgCommandName, command);
            fex.AddArg(ArgErrorCodeName, result.ErrorCode.ToString());
            fex.AddArg(ArgErrorStringName, result.ErrorStr);
            fex.Fire(MainGate);
            InstantLogger.msg(fex.evt.ToString());
        }
 public static void Job(FlexEvent flx)
 {
     var cfgResult = Cfg.ReadCfg(flx);
     if (cfgResult.ErrorCode != CfgLoader.Result.Es.S_ERROR) {
         var req = new Requester(ConnectionStr);
         req.SQLRequestAsync(cfgResult.SQLStr, flx, ResponceGenerator);
     }
     else {
         var command = flx.Arguments.ContainsKey(ArgCommandName) ? (string)flx.Arguments[ArgCommandName] : "";
         var fex = CreateRespFex(flx);
         fex.AddArg(ArgCommandName, command);
         fex.AddArg(ArgErrorCodeName, cfgResult.ErrorCode.ToString());
         fex.AddArg(ArgErrorStringName, cfgResult.ErrorStr);
         fex.Fire(MainGate);
         InstantLogger.msg(fex.evt.ToString());
     }
 }