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);
}
查看全文
相关阅读:
【学习笔记】数据库设计那些事
django rest-farme-work 的使用(3)
django rest-farme-work 的使用(2)
docker 的安装
中国电信线CTF线下选拨writeup
django rest-farme-work 的使用(1)
谈谈python里面关于任务队列
kubernetes 部署
凯撒密码的加密解密
Linux 密码的暴力破解
原文地址:https://www.cnblogs.com/fjchenq/p/525287.html
最新文章
平面向量略解
Java BigInteger类
MySQL索引优化分析(下)
MySQL索引优化分析(上)
MySQL架构介绍
Log4j日志使用记录
Invalid bound statement (not found): com.smart.dao.PersonMapper.select
mybatis-spring中接口和映射文件名一致性
HashMap源码解析
项目上传版本库
热门文章
Springboot配置(下)
博客索引
我的简历
系统间账号认证系统同步方案
antdmobile组件思维导图
nginx二级域名反向代理
前端知识点整理
antd模块组件文档思维导图整理
编写antd配置表单组件
微服务核心20讲 读书笔记
Copyright © 2011-2022 走看看