Пример #1
0
        public ActionResult Exec(IActionContext context)
        {
            List <Dictionary <string, object> > res = new List <Dictionary <string, object> >();

            for (int i = 0, val = Start; i < Count; i++, val += Step)
            {
                using (var newcontext = context.BeginContext())
                {
                    if (!string.IsNullOrEmpty(ItemName))
                    {
                        newcontext.Vars[ItemName] = val;
                    }
                    ChainUtility.Run(this.Entry, newcontext);
                    res.Add(context.GetContextValues());
                }
            }

            return(new ActionResult(res));
        }
Пример #2
0
        public ActionResult Exec(IActionContext context)
        {
            List <Dictionary <string, object> > res = new List <Dictionary <string, object> >();

            if (Source != null)
            {
                foreach (var item in Source)
                {
                    using (var newcontext = context.BeginContext())
                    {
                        if (!string.IsNullOrEmpty(ItemName))
                        {
                            newcontext.Vars[ItemName] = item;
                        }
                        ChainUtility.Run(this.Entry, newcontext);
                        res.Add(context.GetContextValues());
                    }
                }
            }
            return(new ActionResult(res));
        }
Пример #3
0
 public static ActionResult FromContext(IActionContext context)
 {
     return(new ActionResult(context.GetContextValues()));
 }