zoukankan
html css js c++ java
添加文件Node
private
XmlElement AddFileNode(XmlElement rootNode,
string
filename)
{
XmlElement node
=
docOutput.CreateElement(
"
File
"
);
Trace.WriteLine(
string
.Format(
"
\t*File Created: {0}
"
, filename));
PerformStep();
XmlAttribute attName
=
docOutput.CreateAttribute(
"
name
"
);
attName.Value
=
filename;
node.Attributes.Append(attName);
XmlAttribute attTime
=
docOutput.CreateAttribute(
"
startTime
"
);
attTime.Value
=
DateTime.Now.ToFileTime().ToString();
node.Attributes.Append(attTime);
rootNode.AppendChild(node);
return
node;
}
AddFileNode(commonNode,
"
EntityKeyBaseCore.generated.cs
"
);
this
.GetTemplate(
"
EntityKeyBaseCore.generated.cst
"
).SetProperty(
"
BLLNameSpace
"
, BLLNameSpace);
this
.RenderToFile(
"
EntityKeyBaseCore.generated.cst
"
, rootPathBLL
+
"
\\EntityKeyBaseCore.generated.cs
"
,
true
);
if
(
!
File.Exists(rootPathBLL
+
"
\\EntityKeyBase.cs
"
))
{
AddFileNode(commonNode,
"
EntityKeyBase.cs
"
);
this
.GetTemplate(
"
EntityKeyBase.cst
"
).SetProperty(
"
BLLNameSpace
"
, BLLNameSpace);
this
.RenderToFile(
"
EntityKeyBase.cst
"
, rootPathBLL
+
"
\\EntityKeyBase.cs
"
,
true
);
}
public
void
RenderToFile(
string
templateName,
string
path,
bool
overwrite)
{
this
._CurrentFileName
=
path;
this
.GetTemplate(templateName).RenderToFile(path, overwrite);
this
._counter
++
;
}
public
CodeTemplate GetTemplate(
string
templateType)
{
return
(CodeSmith.Engine.CodeTemplate)_CodeTemplates[templateType];
}
public
MoM.Templates.CommonSqlCode GetTemplateBase(
string
templateType)
{
return
(MoM.Templates.CommonSqlCode) GetTemplate(templateType);
}
查看全文
相关阅读:
MySQL · 引擎特性 · InnoDB崩溃恢复
MySQL · 引擎特性 · InnoDB Buffer Pool
MySQL · 引擎特性 · InnoDB IO子系统
MySQL · 引擎特性 · InnoDB 同步机制
docker基本操作命令
IIS日志导出mysql
Win10 MySQL Community Server 8.0.17安装
win10 TortoiseGit 图标不显示
window环境配置nginx
windows openssh安装
原文地址:https://www.cnblogs.com/fjchenq/p/525287.html
最新文章
sql文件或连接数据库反向生成pdm文件
layer.conifrm 非阻塞执行 ztree删除节点 问题
vue项目上如何做ie浏览器的限制的提示。
边缘化搭建 DotNet Core 2.1 自动化构建和部署环境(下)
边缘化搭建 DotNet Core 2.1 自动化构建和部署环境(上)
树莓派2B+安装Debain操作系统
Centos7 & Docker & Jenkins & ASP.NET Core 2.0 自动化发布和部署
Ubuntu16.04使用阿里云镜像安装Mongodb
CentOS7使用阿里云镜像安装Mongodb
angular2 递归导航菜单实现方式
热门文章
Git 更换仓库地址
如何让MVC6在IIS上面跑
Visual Studio 2013 Nuget控制台无法找到程序包
Go 的定时任务模块 Cron 使用
MySQL · 引擎特性 · 临时表那些事儿
POLARDB · 最佳实践 · POLARDB不得不知道的秘密(二)
POLARDB · 最佳实践 · POLARDB不得不知道的秘密
MySQL · 引擎特性 · InnoDB 数据页解析
MySQL · 引擎特性 · InnoDB 事务系统
PolarDB · 新品介绍 · 深入了解阿里云新一代产品 PolarDB
Copyright © 2011-2022 走看看