资源简介
VTemplate及例子,一套很强大.net的模版
代码片段和文件信息
/* ***********************************************
* Author : kingthy
* Email : kingthy@gmail.com
* Description : Attribute
*
* ***********************************************/
using System;
using System.Collections.Generic;
using System.Text;
namespace VTemplate.Engine
{
///
/// 元素属性
///
public class Attribute : ICloneableElement
{
///
/// 元素属性
///
///
///
private Attribute(string name string text)
{
this.Name = name;
this.Text = text;
}
///
/// 元素属性
///
///
///
///
internal Attribute(Element ownerElement string name string text)
{
this.OwnerElement = ownerElement;
this.Name = name;
this.Text = text;
this.Value = ParserHelper.Createexpression(this.OwnerElement.OwnerTemplate this.Text);
}
///
/// 宿主标签
///
public Element OwnerElement { get; internal set; }
///
/// 属性名称
///
public string Name { get; private set; }
///
/// 属性的值文本
///
public string Text { get; private set; }
///
/// 属性的值
///
public Iexpression Value { get; private set; }
///
/// 获取文本值
///
internal string GetTextValue()
{
if (this.Value == null) return this.Text;
object v = this.Value.GetValue();
if (Utility.IsNothing(v)) return string.Empty;
return v.ToString();
}
#region ICloneableElement 成员
///
///
///
///
///
public Attribute Clone(Template ownerTemplate)
{
Attribute attribute = new Attribute(this.Name this.Text);
attribute.OwnerElement = null;
attribute.Value = this.Value == null ? null : this.Value.Clone(ownerTemplate);
return attribute;
}
#endregion
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
I.A.... 2634 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\Attribute.cs
I.A.... 7741 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\AttributeCollection.cs
I.A.... 12676 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\ClassDiagram1.cd
I.A.... 1710 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\Constantex
I.A.... 9922 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\DataReaderTag.cs
I.A.... 797 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\docs\readme.txt
I.A.... 1672 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\Element.cs
I.A.... 3423 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\ElementCollection.cs
I.A.... 3773 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\ElseTag.cs
I.A.... 16436 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\Evaluator\ex
I.A.... 1064 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\Evaluator\ex
I.A.... 10025 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\Evaluator\ex
I.A.... 2512 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\Evaluator\ex
I.A.... 3888 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\Evaluator\ex
I.A.... 6367 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\ex
I.A.... 3197 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\ForEachElseTag.cs
I.A.... 9244 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\ForEachTag.cs
I.A.... 5884 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\ForTag.cs
I.A.... 11093 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\FunctionTag.cs
I.A.... 585 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\IAttributesElement.cs
I.A.... 657 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\IElementCloneable.cs
I.A.... 594 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\Iex
I.A.... 18218 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\IfConditionTag.cs
I.A.... 8672 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\IfTag.cs
I.A.... 5220 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\ImportTag.cs
I.A.... 4339 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\IncludeTag.cs
I.A.... 1134 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\ITemplateRender.cs
I.A.... 6908 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\LoopIndex.cs
文件 5350 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
I.A.... 5709 2014-03-06 23:24 VTemplateSolution\VTemplate.Engine\OutputTag.cs
............此处省略137个文件信息
评论
共有 条评论