VTemplate.Engine/Template.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/* ***********************************************
* Author : kingthy
* Email : kingthy@gmail.com
* Description : Template
*
* ***********************************************/
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
namespace VTemplate.Engine
{
/// <summary>
/// 模板块标签.如: <vt:template id="member">.......</vt:template> 或自闭合的模板:<vt:template id="member" file="member.html" />
/// </summary>
public class Template : Tag
{
/// <summary>
///
/// </summary>
internal Template() : this(null) { }
/// <summary>
///
/// </summary>
/// <param name="ownerTemplate"></param>
internal Template(Template ownerTemplate)
: base(ownerTemplate)
{
this.Visible = true;
this.Charset = (ownerTemplate == null ? Encoding.Default : ownerTemplate.Charset);
this.Variables = new VariableCollection();
this.ChildTemplates = new ElementCollection<Template>();
this.fileDependencies = new List<string>();
this.UserDefinedFunctions = new UserDefinedFunctionCollection();
this.TagContainer = this;
}
#region 重写Tag的方法
/// <summary>
/// 返回标签的名称
/// </summary>
public override string TagName
{
get { return "template"; }
}
/// <summary>
/// 返回此标签是否是单一标签.即是不需要配对的结束标签
/// </summary>
internal override bool IsSingleTag
{
get { return false; }
}
#endregion
#region 属性定义
/// <summary>
/// 模板的关联文件
/// </summary>
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
