Exemplo n.º 1
0
        /// <summary>
        /// 添加标签属性时的触发函数.用于设置自身的某些属性值
        /// </summary>
        /// <param name="name"></param>
        /// <param name="item"></param>
        protected override void OnAddingAttribute(string name, Attribute item)
        {
            switch (name)
            {
            case "args":
                IExpression exp = item.Value;
                if (this.OwnerDocument.DocumentConfig.CompatibleMode)
                {
                    if (!(exp is VariableExpression))
                    {
                        exp = ParserHelper.CreateVariableExpression(this.OwnerTemplate, item.Text, false);
                    }
                }
                this.ExpArgs.Add(exp);
                break;

            case "var":
                this.Variable = ParserHelper.CreateVariableIdentity(this.OwnerTemplate, item.Text);
                break;

            case "output":
                this.Output = Utility.ConverToBoolean(item.Text);
                break;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 添加标签属性时的触发函数.用于设置自身的某些属性值
 /// </summary>
 /// <param name="name"></param>
 /// <param name="item"></param>
 public override void OnAddingAttribute(string name, Attribute item)
 {
     switch (name)
     {
     case "index":
         this.Index = ParserHelper.CreateVariableIdentity(this.OwnerTemplate, item.Text);
         break;
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// 添加标签属性时的触发函数.用于设置自身的某些属性值
 /// </summary>
 /// <param name="name"></param>
 /// <param name="item"></param>
 protected override void OnAddingAttribute(string name, Attribute item)
 {
     switch (name)
     {
     case "var":
         this.Variable = ParserHelper.CreateVariableIdentity(this.OwnerTemplate, item.Text);
         break;
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// 添加标签属性时的触发函数.用于设置自身的某些属性值
        /// </summary>
        /// <param name="name"></param>
        /// <param name="item"></param>
        public override void OnAddingAttribute(string name, Attribute item)
        {
            switch (name)
            {
            case "var":
                this.Variable = ParserHelper.CreateVariableIdentity(this.OwnerTemplate, item.Text);
                break;

            case "output":
                this.Output = Utility.ConverToBoolean(item.Text);
                break;
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// 添加标签属性时的触发函数.用于设置自身的某些属性值
        /// </summary>
        /// <param name="name"></param>
        /// <param name="item"></param>
        public override void OnAddingAttribute(string name, Attribute item)
        {
            switch (name)
            {
            case "from":
                VariableExpression ve = item.Value as VariableExpression;
                if (ve == null && this.OwnerDocument.DocumentConfig.CompatibleMode)
                {
                    ve = ParserHelper.CreateVariableExpression(this.OwnerTemplate, item.Text, false);
                }
                this.From = ve;
                break;

            case "item":
                this.Item = ParserHelper.CreateVariableIdentity(this.OwnerTemplate, item.Text);
                break;

            case "index":
                this.Index = ParserHelper.CreateVariableIdentity(this.OwnerTemplate, item.Text);
                break;
            }
        }