コード例 #1
0
        public override void Perform()
        {
            List <string> list = GetMutiContent();

            if (list.Count > 0)
            {
                ActionArrayVariable var = VariableModel.Find <ActionArrayVariable>(ObjectName);
                if (var == null)
                {
                    throw new ApplicationException("变量" + ObjectName + "未找到,请确定变量" + ObjectName + "是否定义");
                }
                var.AddItemsToList(list);
            }
        }
コード例 #2
0
        public override void Perform()
        {
            Element element = GetElement();

            if (!element.Exists)
            {
                ActionArrayVariable arr = VariableModel.Find <ActionArrayVariable>(ObjectName);
                if (arr == null)
                {
                    throw new ApplicationException("变量" + ObjectName + "未找到");
                }
                arr.AddItemToArray("");
            }
        }
コード例 #3
0
        public override void Perform()
        {
            string value = GetValue(GetElement());

            if (!(string.IsNullOrEmpty(value) && FliterEmptyString))
            {
                ActionArrayVariable arr = VariableModel.Find <ActionArrayVariable>(ObjectName);
                if (arr == null)
                {
                    throw new ApplicationException("变量" + ObjectName + "未找到");
                }
                arr.AddItemToArray(value);
            }
        }
コード例 #4
0
        private void ArrayPerform(ActionVariable var)
        {
            ActionArrayVariable arrVar = var as ActionArrayVariable;

            if (Reverse)
            {
                arrVar.Reverse();
            }
            int count = arrVar.Count;

            if (TopN > 0 && TopN < count)
            {
                count = TopN;
            }
            for (int i = 0; i < count; i++)
            {
                MapAttribute = arrVar.GetMapAttribute(i);
                base.Perform();
            }
        }