Пример #1
0
 public IntelliFlowOutput Execute(IntelliFlow intelliFlow)
 {
     foreach (var item in intelliFlow.Items)
     {
         item.Execute();
     }
     return(null);
 }
Пример #2
0
        public static IIntelliFlow Create(Domain.IntelliFlow data, IDataContext context)
        {
            IDataRepository <Domain.IntelliFlowItem> itemRepos = new EFDataRepository <Domain.IntelliFlowItem>(context);

            var items = itemRepos.Query(x => x.IntelliFlowId == (long)data.Id).ToArray();

            var intFlow = new IntelliFlow();

            if (!items.IsNullOrEmpty())
            {
                var itemList = new List <IIntelliFlowItem>();
                foreach (var item in items)
                {
                    var newItem = Create(item, context);
                    itemList.Add(newItem);
                }
                intFlow.Items = new IntelliFlowIterator <IIntelliFlowItem>(itemList.ToArray());
            }

            return(intFlow);
        }