Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
c9a5482
OK
tavenli Jan 16, 2012
2d8c118
Merge pull request #1 from xianrendzw/master
tavenli Jan 18, 2012
0039211
增加 JPA 的模版
tavenli Jan 19, 2012
eb1290e
增加 JPA 的模版
tavenli Jan 19, 2012
f767b28
OK
tavenli Jan 19, 2012
c2501ff
Merge pull request #1 from tavenli/master
xianrendzw Jan 20, 2012
8488e7f
update README.txt
xianrendzw Jan 20, 2012
b5588cc
update templates
xianrendzw Jan 20, 2012
4b89970
fixed Templates ItemGroup
xianrendzw Jan 29, 2012
1150bc3
update Resources.resx
xianrendzw Jan 30, 2012
bd52596
create Resource.zh-CN.resx
xianrendzw Jan 31, 2012
552d6e0
update MainForm.zh-CN.resx
xianrendzw Jan 31, 2012
5d211db
impl zh-cn localized resource file
xianrendzw Feb 1, 2012
4437e85
update Program.cs
xianrendzw Feb 1, 2012
e53bc15
fixed CodeGeneralOptionsPage.zh-CN.resx
xianrendzw Feb 1, 2012
3cdf055
add LightFramework-Biz.nv Templates
xianrendzw Feb 2, 2012
86f097c
add LightFramework-DAL.nv and LightFramework-View.nv templates
xianrendzw Feb 3, 2012
7833cb6
add category,version properties to Templates.xml
xianrendzw Feb 4, 2012
3be63a2
update Program.cs
xianrendzw Feb 15, 2012
77bd423
add LightFramework-DAL.nv Template
xianrendzw Feb 16, 2012
7b5d59b
fixed PowerDesigner/PowerDesigner12Exporter.cs GetPrimaryKey method
xianrendzw Mar 21, 2012
0ef94eb
update LightFramework-DAL.nv
xianrendzw Mar 21, 2012
45add3d
add the section of user guide
xianrendzw Mar 31, 2012
ef4e311
refactor ConfigManager.cs
xianrendzw Jul 5, 2012
4f1c0af
update
xianrendzw Oct 9, 2012
c82e620
add ijinshan templates
xianrendzw Dec 18, 2013
9cf9381
update
xianrendzw Dec 18, 2013
a516f7c
update
xianrendzw Dec 18, 2013
45a880a
fixed ijinshan-daoimpl.nv
xianrendzw Dec 19, 2013
803f62e
update
xianrendzw Jan 12, 2014
77aa4ea
add UTF-8 BOM
xianrendzw Apr 18, 2014
9c8d623
add travis.yml
xianrendzw Jan 7, 2015
db42fa0
fixed
xianrendzw Mar 19, 2015
3885e8b
remove Ader,Razor,Vic EngineAdapters
xianrendzw Jun 2, 2016
c88b804
add reamder markdown
xianrendzw Jun 2, 2016
273b861
update .gitignore
xianrendzw Jun 2, 2016
ad70327
delete packages
xianrendzw Jun 2, 2016
dbc0fa8
update readme.md files
xianrendzw Jun 2, 2016
6336fdd
update templates
xianrendzw Jun 2, 2016
24eec19
update
xianrendzw Jun 2, 2016
cda3fd6
update docs
xianrendzw Jun 4, 2016
975b236
update readme
xianrendzw Jun 4, 2016
f110433
update readme.md
xianrendzw Jun 4, 2016
f9f7372
update zh-cn md
xianrendzw Jun 4, 2016
83ec02d
modify 制作代码模板
xianrendzw Jun 4, 2016
887b017
update reamde
xianrendzw Jun 4, 2016
b2e6f88
update
xianrendzw Jun 4, 2016
a7cbe53
update
xianrendzw Jun 4, 2016
ad49d1c
update resource-zhcn
xianrendzw Jun 4, 2016
9b0c03b
update make template docs
xianrendzw Jun 5, 2016
2d67b57
update
xianrendzw Jun 5, 2016
4f80b84
update
xianrendzw Jun 5, 2016
d46dbda
Update README.MD
xianrendzw Jun 7, 2016
9ec322e
Update README.MD
xianrendzw Jun 7, 2016
5ea2b85
Update README_ZH-CN.MD
xianrendzw Jun 7, 2016
1273bf2
Update README_ZH-CN.MD
xianrendzw Jun 7, 2016
16376fa
fixed bug
xianrendzw Jul 17, 2016
7cb5d2b
Merge branch 'master' of https://github.com/xianrendzw/CodeBuilder
xianrendzw Jul 17, 2016
63bd012
fixed bug
xianrendzw Jul 17, 2016
0b82210
Create easyreport2-mapper-example.nv
xianrendzw Aug 11, 2016
b00fa63
Update easyreport2-mapper-example.nv
xianrendzw Aug 11, 2016
ad9a74c
Update easyreport2-mapper-example.nv
xianrendzw Aug 11, 2016
d3ff5a3
update
xianrendzw Apr 13, 2017
44017dd
update
xianrendzw Apr 13, 2017
746b96b
support mybatis generator template
xianrendzw Apr 16, 2017
49f6454
add controller template
xianrendzw Apr 24, 2017
0f9bfc9
update
xianrendzw Apr 24, 2017
0d74fd2
update
xianrendzw Apr 24, 2017
f3a10ea
update
Apr 25, 2017
4c97727
update
Apr 26, 2017
73312c6
update template
xianrendzw Apr 26, 2017
27b4478
update
May 2, 2017
730c2cf
UP
xianrendzw May 20, 2017
90a687b
UP
xianrendzw May 20, 2017
12b0a21
update
May 20, 2017
168592c
update template for mybatis
May 20, 2017
d436145
update
xianrendzw May 21, 2017
99f99c2
update controller template
xianrendzw May 21, 2017
68e2e4a
update
xianrendzw Jun 21, 2017
18e97ec
update
Jun 21, 2017
b923a13
Update mybatis-example.nv
xianrendzw Apr 25, 2018
c6ec153
Update mybatis-example.nv
xianrendzw Apr 25, 2018
18b2002
Update mybatis-example.nv
xianrendzw Apr 25, 2018
49f9fb5
Update mybatis-example.nv
xianrendzw Apr 25, 2018
eea2b64
Update mybatis-example.nv
xianrendzw Apr 25, 2018
7f5cd22
Update mybatis-example.nv
xianrendzw Apr 25, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ Thumbs.db
obj/
[Rr]elease*/
_ReSharper*/
[Tt]est[Rr]esult*
[Tt]est[Rr]esult*
packages
vs
.vs
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
language: csharp
solution: CodeBuilder.sln
before_install:
- mysql -e "create database IF NOT EXISTS easy_admin;" -uroot
8 changes: 6 additions & 2 deletions CodeBuilder.Console/CodeBuilder.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,14 @@
</ItemGroup>
<ItemGroup>
<ConfigFile Include="Config\DataSources.xml" />
<ConfigFile Include="Config\Options.xml" />
<ConfigFile Include="Config\Options.xml">
<SubType>Designer</SubType>
</ConfigFile>
<ConfigFile Include="Config\Templates.xml" />
<ConfigFile Include="Config\Settings.xml" />
<ConfigFile Include="Config\TypeMapping.xml" />
<ConfigFile Include="Config\TypeMapping.xml">
<SubType>Designer</SubType>
</ConfigFile>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
8 changes: 4 additions & 4 deletions CodeBuilder.Console/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
[assembly: AssemblyTitle("CodeBuilder.Console")]
[assembly: AssemblyDescription("CodeBuilder Command Line")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("www.dengzhiwei.com")]
[assembly: AssemblyCompany("http://www.easytoolsoft.com/")]
[assembly: AssemblyProduct("CodeBuilder.WinForm")]
[assembly: AssemblyCopyright("Copyright © Tom Deng 2011-2012")]
[assembly: AssemblyCopyright("Copyright © Tom Deng 2009-2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.11.1210")]
[assembly: AssemblyFileVersion("1.0.11.1210")]
[assembly: AssemblyVersion("1.1.16.0602")]
[assembly: AssemblyFileVersion("1.1.16.0602")]
13 changes: 9 additions & 4 deletions CodeBuilder.Framework.Test/CodeBuilder.Framework.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,13 @@
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\lib\Test\UNuit2.5.10\nunit.framework.dll</HintPath>
<Reference Include="Moq, Version=4.2.1510.2205, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework, Version=3.2.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.2.1\lib\net40\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
Expand Down Expand Up @@ -86,6 +90,7 @@
<None Include="App.config">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ConfigFile Include="Config\DataSources.xml" />
Expand All @@ -95,7 +100,7 @@
<ConfigFile Include="Config\TypeMapping.xml" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
<Target Name="BeforeBuild">
<Target Name="BeforeBuild">
<Copy SourceFiles="@(ConfigFile)" DestinationFolder="$(OutputPath)\Config" />
</Target>
</Project>
1 change: 0 additions & 1 deletion CodeBuilder.Framework.Test/Config/DataSources.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
<clear/>
<dataSource name="test_pdm" connectionString="d:\test.pdm" exporter="PowerDesigner12" />
<dataSource name="test_db" connectionString="server=localhost;user id=root; password=ddd;database=codebook;Pooling=true" exporter="MySQL5" />
<dataSource name="kigg" connectionString="server=TOMDENG-PC\SQLEXPRESS;user id=sa; password=ddd;database=kigg;Pooling=true" exporter="SqlServer2008" />
</dataSources>
</dataSourceSection>
11 changes: 5 additions & 6 deletions CodeBuilder.Framework.Test/Config/Settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<language name="JAVA" alias="java" ext=".java" isDynamic="false"/>
<language name="Ruby" alias="ruby" ext=".rb" isDynamic="true"/>
<language name="PHP" alias="php" ext=".php" isDynamic="true"/>
<language name="XML" alias="xml" ext=".xml" isDynamic="false"/>
<language name="MyBatisMapper" alias="mybatisMapper" ext=".xml" isDynamic="false"/>
</languages>
<exporters>
<exporter name="PowerDesigner12" type="CodeBuilder.DataSource.Exporter.PowerDesigner12Exporter,CodeBuilder.Framework"/>
Expand Down Expand Up @@ -36,14 +38,11 @@
</pdmDatabases>
<templateEngines>
<templateEngine name="NVelocity" ext=".nv" adapter="CodeBuilder.TemplateEngine.NVelocityEngineAdapter,CodeBuilder.Framework" />
<templateEngine name="Razor" ext=".raz" adapter="CodeBuilder.TemplateEngine.RazorEngineAdapter,CodeBuilder.Framework" />
<templateEngine name="Vici" ext=".vic" adapter="CodeBuilder.TemplateEngine.ViciEngineAdapter,CodeBuilder.Framework" />
<templateEngine name="Ader" ext=".adr" adapter="CodeBuilder.TemplateEngine.AderEngineAdapter,CodeBuilder.Framework" />
</templateEngines>
<appSettings>
<add key="typeMapper" value="CodeBuilder.TypeMapping.DefaultTypeMapper,CodeBuilder.Framework" />
<add key="onlineTemplateUrl" value="http://www.dengzhiwei.com/category/codebuilder/templates"/>
<add key="helpUrl" value="http://www.dengzhiwei.com/category/codebuilder"/>
<add key="feedbackUrl" value="http://www.dengzhiwei.com/category/codebuilder-feedback"/>
<add key="onlineTemplateUrl" value="https://github.com/xianrendzw/CodeBuilder/tree/master/CodeBuilder.WinForm/Templates"/>
<add key="helpUrl" value="https://github.com/xianrendzw/CodeBuilder/blob/master/README.MD"/>
<add key="feedbackUrl" value="https://github.com/xianrendzw/CodeBuilder/issues"/>
</appSettings>
</settingsSection>
29 changes: 29 additions & 0 deletions CodeBuilder.Framework.Test/Config/TypeMapping.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,35 @@
<add name="varbinary" langtype="Byte[]" default="" />
<add name="varchar" langtype="String" default="" />
</typeMapping>
<typeMapping name="mysql5-mybatismapper" database="mysql5" language="xml">
<add name="default" langtype="VARCHAR" default="" />
<add name="nvarchar" langtype="NVARCHAR" default="" />
<add name="bigint" langtype="BIGINT" default="" />
<add name="binary" langtype="BINARY" default="" />
<add name="bit" langtype="BIT" default="" />
<add name="char" langtype="CHAR" default="" />
<add name="datetime" langtype="TIMESTAMP" default="" />
<add name="decimal" langtype="DECIMAL" default="" />
<add name="float" langtype="FLOAT" default="" />
<add name="image" langtype="VARBINARY" default="" />
<add name="int" langtype="INTEGER" default="" />
<add name="money" langtype="DECIMAL" default="" />
<add name="nchar" langtype="NCHAR" default="" />
<add name="ntext" langtype="LONGVARCHAR" default="" />
<add name="numeric" langtype="NUMERIC" default="" />
<add name="nvarchar" langtype="NVARCHAR" default="" />
<add name="real" langtype="REAL" default="" />
<add name="smalldatetime" langtype="DATE" default="" />
<add name="smallint" langtype="SMALLINT" default="" />
<add name="smallmoney" langtype="DOUBLE" default="" />
<add name="sql_variant" langtype="VARBINARY" default="" />
<add name="text" langtype="LONGVARCHAR" default="" />
<add name="timestamp" langtype="TIMESTAMP" default="" />
<add name="tinyint" langtype="TINYINT" default="" />
<add name="uniqueidentifier" langtype="Guid" default="" />
<add name="varbinary" langtype="VARBINARY" default="" />
<add name="varchar" langtype="VARCHAR" default="" />
</typeMapping>
<typeMapping name="oracle-csharp" database="oracle" language="C#">
<add name="default" langtype="String" default="" />
<add name="bfile" langtype="Byte[]" default="" />
Expand Down
8 changes: 4 additions & 4 deletions CodeBuilder.Framework.Test/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CodeBuilder.Framework.Test")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyDescription("CodeBuilder Framework Test")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("http://www.easytoolsoft.com/")]
[assembly: AssemblyProduct("CodeBuilder.Framework.Test")]
[assembly: AssemblyCopyright("Copyright 2011")]
[assembly: AssemblyCopyright("Copyright © Tom Deng 2009-2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -28,4 +28,4 @@
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.16.0602")]
5 changes: 5 additions & 0 deletions CodeBuilder.Framework.Test/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Moq" version="4.2.1510.2205" targetFramework="net40" />
<package id="NUnit" version="3.2.1" targetFramework="net40" />
</packages>
64 changes: 30 additions & 34 deletions CodeBuilder.Framework/CodeBuilder.Framework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,17 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\lib\ADO.NET\oracle\4\Oracle.DataAccess.dll</HintPath>
<Reference Include="MySql.Data, Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>..\packages\MySql.Data.6.9.8\lib\net40\MySql.Data.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NVelocity, Version=1.1.1.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.NVelocity.1.1.1\lib\net40\NVelocity.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=AMD64">
<HintPath>..\packages\odp.net.x64.112.3.20\lib\net40\Oracle.DataAccess.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
Expand All @@ -46,33 +54,6 @@
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Reference Include="mysql.data, Version=6.4.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\lib\ADO.NET\mysql\v4\mysql.data.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NVelocity">
<HintPath>..\lib\TemplateEngines\NVelocity-1.1.1\net40\NVelocity.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="RazorEngine">
<HintPath>..\lib\TemplateEngines\Razor2.1\RazorEngine.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\lib\TemplateEngines\Razor2.1\System.Web.Razor.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="TemplateEngine">
<HintPath>..\lib\TemplateEngines\AderV2\TemplateEngine.dll</HintPath>
</Reference>
<Reference Include="Vici.Core">
<HintPath>..\lib\TemplateEngines\Vici.Engine.1.0.0\Vici.Core.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Configuration\ConfigManager.cs" />
<Compile Include="Configuration\DataSource\DataSourceElement.cs" />
Expand Down Expand Up @@ -125,10 +106,12 @@
<Compile Include="PhysicalDataModel\View.cs" />
<Compile Include="PhysicalDataModel\Views.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TemplateEngine\Adapters\AderEngineAdapter.cs" />
<Compile Include="Properties\Resource.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resource.resx</DependentUpon>
</Compile>
<Compile Include="TemplateEngine\Adapters\NVelocityEngineAdapter.cs" />
<Compile Include="TemplateEngine\Adapters\RazorEngineAdapter.cs" />
<Compile Include="TemplateEngine\Adapters\ViciEngineAdapter.cs" />
<Compile Include="TemplateEngine\ITemplateEngine.cs" />
<Compile Include="TemplateEngine\TemplateData.cs" />
<Compile Include="TemplateEngine\TemplateDataBuilder.cs" />
Expand All @@ -145,7 +128,20 @@
<Compile Include="Util\SerializeHelper.cs" />
<Compile Include="Util\StringExtension.cs" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<EmbeddedResource Include="Properties\Resource.zh-CN.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resource.zh-CN.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resource.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resource.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
17 changes: 5 additions & 12 deletions CodeBuilder.Framework/Configuration/ConfigManager.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Reflection;
using System.Configuration;
using System.IO;

namespace CodeBuilder.Configuration
{
using Util;
using Exceptions;
using Framework.Properties;

public class ConfigManager
{
Expand Down Expand Up @@ -196,7 +189,7 @@ public static void Save()
}
catch (Exception ex)
{
throw new ConfigurationErrorsException("Save configuration failure", ex);
throw new ConfigurationErrorsException(Resource.SaveConfigurationFailure, ex);
}
}

Expand All @@ -212,7 +205,7 @@ private static void LoadConfiguration()
}
catch (Exception ex)
{
throw new ConfigurationErrorsException("Load configuration failure", ex);
throw new ConfigurationErrorsException(Resource.LoadConfigurationFailure, ex);
}
}

Expand All @@ -224,7 +217,7 @@ private static T GetConfigSection<T>(string name) where T:ConfigurationSection
}
catch (Exception ex)
{
throw new ConfigurationErrorsException(string.Format("ConfigurationSection {0} load failure", name), ex);
throw new ConfigurationErrorsException(string.Format(Resource.ConfigurationSectionLoadFailure, name), ex);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class GenerationSettings
private string[] _templateNames;
private string _encoding;
private bool _isOmitTablePrefix;
private bool _isStandardizeName;
private bool _isCamelCaseName;

public GenerationSettings() { }

Expand All @@ -31,7 +31,7 @@ public GenerationSettings(string language, string templateEngine)

public GenerationSettings(string language, string templateEngine, string package,
string tablePrefix, string author, string version, string[] templateNames, string encoding,
bool isOmitTablePrefix, bool isStandardizeName)
bool isOmitTablePrefix, bool isCamelCaseName)
{
this._language = language;
this._templateEngine = templateEngine;
Expand All @@ -42,7 +42,7 @@ public GenerationSettings(string language, string templateEngine, string package
this._templateNames = templateNames;
this._encoding = encoding;
this._isOmitTablePrefix = isOmitTablePrefix;
this._isStandardizeName = isStandardizeName;
this._isCamelCaseName = isCamelCaseName;
}

[XmlElement("Language")]
Expand Down Expand Up @@ -109,11 +109,11 @@ public bool IsOmitTablePrefix
set { this._isOmitTablePrefix = value; }
}

[XmlElement("IsStandardizeName")]
public bool IsStandardizeName
[XmlElement("IsCamelCaseName")]
public bool IsCamelCaseName
{
get { return this._isStandardizeName; }
set { this._isStandardizeName = value; }
get { return this._isCamelCaseName; }
set { this._isCamelCaseName = value; }
}
}
}
14 changes: 14 additions & 0 deletions CodeBuilder.Framework/Configuration/Template/TemplateElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,20 @@ public string Description
set { base["desc"] = value; }
}

[ConfigurationProperty("category", IsRequired = true)]
public string Category
{
get { return base["category"].ToString(); }
set { base["category"] = value; }
}

[ConfigurationProperty("version", IsRequired = true)]
public string Version
{
get { return base["version"].ToString(); }
set { base["version"] = value; }
}

[ConfigurationProperty("parser", IsRequired = false)]
public string Parser
{
Expand Down
Loading