更新组件,兼容IE11

This commit is contained in:
2020-10-11 18:03:54 +08:00
parent c6b0efc887
commit ab40520cda
87 changed files with 22478 additions and 7542 deletions
+33 -5
View File
@@ -8,10 +8,38 @@
<#
// 设置当前工作目录
PathHelper.BasePath = Host.ResolvePath(".");
// 导入模型文件并生成实体类,模型文件、输出目录、命名空间、连接名、中文文件名、表名字段名大小写
//EntityBuilder.Build(String xmlFile = null, String output = null, String nameSpace = null, String connName = null, Boolean? chineseFileName = true,Boolean? nameIgnoreCase = null);
EntityBuilder.Build();
//var tables = DAL.ImportFrom("Company.Project.xml");
//EntityBuilder.Build(tables);
// 加载模型文件,得到数据表
var option = new BuilderOption();
var tables = ClassBuilder.LoadModels(null, option, out var atts);
EntityBuilder.FixModelFile(null, option, atts, tables);
// 生成实体类
//option.BaseClass = "I{name}";
//option.ModelNameForCopy = "I{name}";
EntityBuilder.BuildTables(tables, option, chineseFileName: true);
// 生成简易模型类
option.Output = @"Output\EntityModels\";
option.ClassNameTemplate = "{name}Model";
option.ModelNameForCopy = "I{name}";
//ClassBuilder.BuildModels(tables, option);
// 生成简易接口
option.BaseClass = null;
option.ClassNameTemplate = null;
option.Output = @"Output\EntityInterfaces\";
//ClassBuilder.BuildInterfaces(tables, option);
// 精确控制生成
/*foreach (var item in tables)
{
var builder = new ClassBuilder
{
Table = item,
Option = option.Clone(),
};
builder.Execute();
builder.Save(null, true, false);
}*/
#>
+33 -5
View File
@@ -9,10 +9,38 @@
<#
// 设置当前工作目录
PathHelper.BasePath = Host.ResolvePath(".");
// 导入模型文件并生成实体类,模型文件、输出目录、命名空间、连接名、中文文件名、表名字段名大小写
//EntityBuilder.Build(String xmlFile = null, String output = null, String nameSpace = null, String connName = null, Boolean? chineseFileName = true,Boolean? nameIgnoreCase = null);
EntityBuilder.Build();
//var tables = DAL.ImportFrom("Company.Project.xml");
//EntityBuilder.Build(tables);
// 加载模型文件,得到数据表
var option = new BuilderOption();
var tables = ClassBuilder.LoadModels(null, option, out var atts);
EntityBuilder.FixModelFile(null, option, atts, tables);
// 生成实体类
//option.BaseClass = "I{name}";
//option.ModelNameForCopy = "I{name}";
EntityBuilder.BuildTables(tables, option, chineseFileName: true);
// 生成简易模型类
option.Output = @"Output\EntityModels\";
option.ClassNameTemplate = "{name}Model";
option.ModelNameForCopy = "I{name}";
//ClassBuilder.BuildModels(tables, option);
// 生成简易接口
option.BaseClass = null;
option.ClassNameTemplate = null;
option.Output = @"Output\EntityInterfaces\";
//ClassBuilder.BuildInterfaces(tables, option);
// 精确控制生成
/*foreach (var item in tables)
{
var builder = new ClassBuilder
{
Table = item,
Option = option.Clone(),
};
builder.Execute();
builder.Save(null, true, false);
}*/
#>
+4 -4
View File
@@ -31,8 +31,8 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="NewLife.Core, Version=8.9.7520.62, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NewLife.Core.8.9.2020.802\lib\net46\NewLife.Core.dll</HintPath>
<Reference Include="NewLife.Core, Version=8.10.7580.42276, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NewLife.Core.8.10.2020.1002\lib\net46\NewLife.Core.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@@ -48,8 +48,8 @@
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="XCode, Version=9.19.7520.67, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NewLife.XCode.9.19.2020.802\lib\net45\XCode.dll</HintPath>
<Reference Include="XCode, Version=10.0.7580.42277, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NewLife.XCode.10.0.2020.1002\lib\net45\XCode.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
+2 -2
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NewLife.Core" version="8.9.2020.802" targetFramework="net461" />
<package id="NewLife.XCode" version="9.19.2020.802" targetFramework="net461" />
<package id="NewLife.Core" version="8.10.2020.1002" targetFramework="net461" />
<package id="NewLife.XCode" version="10.0.2020.1002" targetFramework="net461" />
</packages>