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);
}
查看全文
相关阅读:
CSS3相关编码规范
WEB开发中常见的漏洞
Python常用端口扫描
33、Django实战第33天:我的消息
32、Django实战第32天:我的收藏
31、Django实战第31天:我的课程
30、Django实战第30天:修改邮箱和用户信息
29、Django实战第29天:修改密码和头像
28、Django实战第28天:个人信息展示
27、Django实战第27天:全局搜索功能开发
原文地址:https://www.cnblogs.com/fjchenq/p/525287.html
最新文章
SSM
Mybatis
Ant网址
Spring <context:annotation-config> 和 <context:component-scan>区别
Spring 报错
Spring的Scheme位置
编程式事务和声明式事务
DataSource是什么
《图解HTTP》读书笔记
加密解密基础问题:字节数组和(16进制)字符串的相互转换(转)
热门文章
关于B/S系统在移动端应用的一些注意的地方(不断更新)
关于单元测试的一些笔记
node.js学习笔记
几种placeholder替换项目参数的方法比较
maven项目转eclipse工程的命令:eclipse.bat
关于maven参数过滤
tortoiseGit的SHH秘钥设置
GIT学习笔记
┱Python中关于urllib和urllib2的问题
Python简单的登录注册代码
Copyright © 2011-2022 走看看