但是在今天生成代码时发现一个小小的问题:在PD生成代码时,它会将实体中的attribe生成C#中的public field,而不是property,找了半天终于发现有一种方法:
在\Resource Files\Object Languages\csharp.xol文件中保存了根据模型生成代码的配置,因此,只需要修改其中Attribute项的definition项即可。或者使用lanuage-->edit current object language..功能,将 Profile\Attribute\Templates\definition改为:
.if (%isValidAttribute%)
[%comment%\n]\
[%customAttributes%\n]\
[%oid%\n]\
.if (%multiplicity% == 1) and (%isIndexer% == false)
private %dataType% _%code%[ = %InitialValue%];
[%visibility% ][%flags% ]%dataType% %code%
{
get
{
return _%code%;
}
set
{
_%code%=value;
}
}
.else
private %dataType%[%arraySize%] _%code%[ = %InitialValue%];
[%visibility% ][%flags% ]%dataType%[%arraySize%] %code%
{
get
{
return _%code%;
}
set
{
_%code%=value;
}
}
.endif
.endif
(上面的代码可以做define进行简化。)
另外,今天在Flier's Sky那里找到了一个.NET Refactoring for VS.NET的破解方法,

不过那个注册表路径有问题,应该是[HKEY_LOCAL_MACHINE\SOFTWARE\.NET Refactoring\C# Refactoring Tool]
"Key"="Flier Lu"