示例#1
0
        private void ActionManagerTest()
        {
            var        am = Program.GetServices().GetRequiredService <IActionManager>();
            ActionInfo ai = am.GetActionInfo("Sys.LoginRequest");

            _logger.LogDebug(ai.GetInputParamTable().ToString());
            _logger.LogDebug(ai.GetOutputParamTable().ToString());
            var dt = ai.GetOutputParamTable();

            dt.AddNew();
            dt["PublicKey"] = "123456789";
            dt.Update();
        }
示例#2
0
 public DataPackage GetInputParamTable()
 {
     if (this.DialogResult == DialogResult.OK)
     {
         this.Save();
         var dr = _ai.GetInputParamTable();
         dr.AddNew();
         foreach (var pi in _ai.InterfaceParameters.Where(kvp => kvp.Value.Dirrect == ParamDirrect.Input).Select(kvp => kvp.Value))
         {
             dr[pi.AttribName] = this.GetItem(pi.AttribName).Value;
         }
         dr.Update();
         return(dr);
     }
     else
     {
         return(null);
     }
 }
示例#3
0
文件: CKSTest.cs 项目: S031/MetaStack
        private static async Task <string> RecursiveCallExecuteAsync(ActionInfo ai, int loopCount)
        {
            if (loopCount > 0)
            {
                var am = ai.GetContext()
                         .Services
                         .GetRequiredService <IActionManager>();

                var start = DateTime.Now;
                for (int i = 0; i < loopCount; i++)
                {
                    await am.ExecuteAsync(ai, ai.GetInputParamTable()
                                          .AddNew()
                                          .SetValue("@ObjectName", "RecursiveCallExecuteAsync")
                                          .SetValue("@IDs", "0")
                                          .Update());
                }
                return($"IActionManager.ExecuteAsync test loop count = {loopCount}, total times = {(DateTime.Now - start).TotalMilliseconds}ms");
            }
            return("");
        }