/// <summary> /// 添加标签属性时的触发函数 /// </summary> /// <param name="name"></param> /// <param name="item"></param> protected virtual void OnAddingAttribute(string name, DMEWeb_Attribute item) { }
/// <summary> /// 添加标签属性时的触发函数.用于设置自身的某些属性值 /// </summary> /// <param name="name"></param> /// <param name="item"></param> protected override void OnAddingAttribute(string name, DMEWeb_Attribute item) { switch (name) { case "from": DMEWeb_VariableExpression ve = item.Value as DMEWeb_VariableExpression; if (ve == null && this.OwnerDocument.DocumentConfig.CompatibleMode) { ve = DMEWeb_ParserHelper.CreateVariableExpression(this.OwnerTemplate, item.Text, false); } this.From = ve; break; case "item": this.Item = DMEWeb_ParserHelper.CreateVariableIdentity(this.OwnerTemplate, item.Text); break; case "index": this.Index = DMEWeb_ParserHelper.CreateVariableIdentity(this.OwnerTemplate, item.Text); break; } }
/// <summary> /// 添加标签属性时的触发函数.用于设置自身的某些属性值 /// </summary> /// <param name="name"></param> /// <param name="item"></param> protected override void OnAddingAttribute(string name, DMEWeb_Attribute item) { switch (name) { case "var": this.Variable = DMEWeb_ParserHelper.CreateVariableIdentity(this.OwnerTemplate, item.Text); break; case "output": this.Output = DMEWeb_Utility.ConverToBoolean(item.Text); break; } }
/// <summary> /// 添加标签属性时的触发函数.用于设置自身的某些属性值 /// </summary> /// <param name="name"></param> /// <param name="item"></param> protected override void OnAddingAttribute(string name, DMEWeb_Attribute item) { switch (name) { case "var": this.Variable = DMEWeb_ParserHelper.CreateVariableIdentity(this.OwnerTemplate, item.Text); break; case "parameters": DMEWeb_IExpression exp = item.Value; if (this.OwnerDocument.DocumentConfig.CompatibleMode) { if (!(exp is DMEWeb_VariableExpression)) exp = DMEWeb_ParserHelper.CreateVariableExpression(this.OwnerTemplate, item.Text, false); } this.Parameters.Add(exp); break; } }
/// <summary> /// 添加标签属性时的触发函数.用于设置自身的某些属性值 /// </summary> /// <param name="name"></param> /// <param name="item"></param> protected override void OnAddingAttribute(string name, DMEWeb_Attribute item) { switch (name) { case "var": this.VarExpression = DMEWeb_ParserHelper.CreateVariableExpression(this.OwnerTemplate, item.Text, false); break; case "value": this.Values.Add(item.Value); break; } }
/// <summary> /// 添加标签属性时的触发函数.用于设置自身的某些属性值 /// </summary> /// <param name="name"></param> /// <param name="item"></param> protected override void OnAddingAttribute(string name, DMEWeb_Attribute item) { switch (name) { case "file": this.File = item.Text; break; case "charset": this.Charset = DMEWeb_Utility.GetEncodingFromCharset(item.Text, this.OwnerTemplate.Charset); break; } }
/// <summary> /// 添加标签属性时的触发函数.用于设置自身的某些属性值 /// </summary> /// <param name="name"></param> /// <param name="item"></param> protected override void OnAddingAttribute(string name, DMEWeb_Attribute item) { switch (name) { case "index": this.Index = DMEWeb_ParserHelper.CreateVariableIdentity(this.OwnerTemplate, item.Text); break; } }