[NFrog]扩展字段类型
引用
添加对NHFrog.Generator.dll的引用
继承
所有类型都继承自ColumnType类
重写
通过重写ColumnType相关的方法,实现字段相关属性的描述。下面以Decimal类型举个例
public class Decimal:ColumnType
{
public Decimal()
{
}
public override string TypeName
{
get{return "Decimal";}
}
public override string DotNetTypeName
{
get{return "System.Decimal";}
}
public override bool NeedLength
{
get{return false;}
}
public override bool CanPrimaryKey
{
get{return false;}
}
}
添加到工具中
打开工具所在目录下的frog.config文件,找到<TypeAssemblys>节点
<TypeAssemblys>
<Assembly>NHFrog.Generator.TypeList.dll</Assembly>
</TypeAssemblys>
如上的,添加新的Assembly。
添加对NHFrog.Generator.dll的引用
继承
所有类型都继承自ColumnType类
重写
通过重写ColumnType相关的方法,实现字段相关属性的描述。下面以Decimal类型举个例
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](/Images/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](/Images/OutliningIndicators/ExpandedBlockEnd.gif)
添加到工具中
打开工具所在目录下的frog.config文件,找到<TypeAssemblys>节点
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)