using System;
namespace NCC.ViewEngine
{
///
/// 字符串模板执行部件
///
public sealed partial class ViewEnginePart
{
///
/// 设置模板
///
///
///
public ViewEnginePart SetTemplate(string template)
{
if (!string.IsNullOrWhiteSpace(template)) Template = template;
return this;
}
///
/// 设置模板数据
///
///
///
///
public ViewEnginePart SetTemplateModel(T model)
where T : class, new()
{
TemplateModel = (typeof(T), model);
return this;
}
///
/// 设置模板数据
///
///
///
public ViewEnginePart SetTemplateModel(object model)
{
return SetTemplateModel