diff --git a/Doc/logo.ico b/Doc/logo.ico
new file mode 100644
index 0000000..855c897
Binary files /dev/null and b/Doc/logo.ico differ
diff --git a/NewLife.Agent/NewLife.Agent.csproj b/NewLife.Agent/NewLife.Agent.csproj
index cb223c2..da43c2d 100644
--- a/NewLife.Agent/NewLife.Agent.csproj
+++ b/NewLife.Agent/NewLife.Agent.csproj
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>netstandard2.0</TargetFramework>
+ <TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<AssemblyName>NewLife.Agent</AssemblyName>
<RootNamespace>NewLife.Agent</RootNamespace>
<AssemblyTitle>新生命服务代理</AssemblyTitle>
<Description>应用程序注册为系统服务,仅支持Windows</Description>
<Company>新生命开发团队</Company>
<Copyright>©2002-2019 新生命开发团队</Copyright>
- <Version>8.3.2019.0822</Version>
- <FileVersion>8.3.2019.0822</FileVersion>
+ <Version>8.3.2019.0923</Version>
+ <FileVersion>8.3.2019.0923</FileVersion>
<AssemblyVersion>8.3.*</AssemblyVersion>
<Deterministic>false</Deterministic>
<OutputPath>..\..\Bin</OutputPath>
@@ -22,7 +22,7 @@
<PackageId>$(AssemblyName)</PackageId>
<Authors>$(Company)</Authors>
<ProjectUrl>https://github.com/NewLifeX</ProjectUrl>
- <PackageIconUrl>http://www.NewLifeX.com/favicon.ico</PackageIconUrl>
+ <PackageIcon>logo.ico</PackageIcon>
<RepositoryUrl>https://github.com/NewLifeX/X</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>新生命团队;X组件;NewLife;$(AssemblyName)</PackageTags>
@@ -30,7 +30,8 @@
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSource>true</IncludeSource>
- </PropertyGroup>
+
+</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
<DefineConstants>$(DefineConstants);NETSTANDARD2_0</DefineConstants>
@@ -47,6 +48,10 @@
</PropertyGroup>
<ItemGroup>
+ <None Include="..\Doc\logo.ico" Link="logo.ico" Pack="true" PackagePath="\" />
+ </ItemGroup>
+
+ <ItemGroup>
<Compile Include="..\NewLife.Core\Agent\AgentService.cs" Link="AgentService.cs" />
<Compile Include="..\NewLife.Core\Agent\AgentServiceBase.cs" Link="AgentServiceBase.cs" />
<Compile Include="..\NewLife.Core\Agent\ServiceHelper.cs" Link="ServiceHelper.cs" />
diff --git a/NewLife.Core/Data/Packet.cs b/NewLife.Core/Data/Packet.cs
index b27d682..f7b6cb3 100644
--- a/NewLife.Core/Data/Packet.cs
+++ b/NewLife.Core/Data/Packet.cs
@@ -49,7 +49,7 @@ namespace NewLife.Data
{
#if NET46
// 尝试抠了内部存储区,下面代码需要.Net 4.6支持
- if (stream.TryGetBuffer(out var seg))
+ if (ms.TryGetBuffer(out var seg))
Set(seg.Array, seg.Offset, seg.Count);
else
#endif
diff --git a/NewLife.Core/IO/IOHelper.cs b/NewLife.Core/IO/IOHelper.cs
index 6b10518..eb4d1a6 100644
--- a/NewLife.Core/IO/IOHelper.cs
+++ b/NewLife.Core/IO/IOHelper.cs
@@ -288,7 +288,9 @@ namespace System
}
des.WriteEncodedInt(src.Length);
- return des.Write(src);
+ des.Write(src);
+
+ return des;
}
/// <summary>读取字节数组,先读取压缩整数表示的长度</summary>
diff --git a/NewLife.Core/NewLife.Core.csproj b/NewLife.Core/NewLife.Core.csproj
index 170f5fa..89e48f4 100644
--- a/NewLife.Core/NewLife.Core.csproj
+++ b/NewLife.Core/NewLife.Core.csproj
@@ -1,99 +1,111 @@
-<Project Sdk="Microsoft.NET.Sdk">
- <PropertyGroup>
- <TargetFrameworks>net45;netstandard2.0;net40</TargetFrameworks>
- <AssemblyName>NewLife.Core</AssemblyName>
- <RootNamespace>NewLife</RootNamespace>
- <AssemblyTitle>新生命X组件核心库</AssemblyTitle>
- <Description>算法、日志、网络、RPC、序列化、缓存、Windows服务、线程池</Description>
- <Company>新生命开发团队</Company>
- <Copyright>©2002-2019 新生命开发团队</Copyright>
- <Version>8.3.2019.0822</Version>
- <FileVersion>8.3.2019.0822</FileVersion>
- <AssemblyVersion>8.3.*</AssemblyVersion>
- <Deterministic>false</Deterministic>
- <OutputPath>..\..\Bin</OutputPath>
- <DocumentationFile>$(OutputPath)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <DefineConstants>TRACE</DefineConstants>
- </PropertyGroup>
-
- <PropertyGroup>
- <PackageId>$(AssemblyName)</PackageId>
- <Authors>$(Company)</Authors>
- <ProjectUrl>https://github.com/NewLifeX</ProjectUrl>
- <PackageIconUrl>http://www.NewLifeX.com/favicon.ico</PackageIconUrl>
- <RepositoryUrl>https://github.com/NewLifeX/X</RepositoryUrl>
- <RepositoryType>git</RepositoryType>
- <PackageTags>新生命团队;X组件;NewLife;$(AssemblyName)</PackageTags>
- <PackageReleaseNotes>增强TinyHttpClient</PackageReleaseNotes>
- <AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
- <PublishRepositoryUrl>true</PublishRepositoryUrl>
- <EmbedUntrackedSources>true</EmbedUntrackedSources>
- <IncludeSource>true</IncludeSource>
- <LangVersion>latest</LangVersion>
- </PropertyGroup>
-
- <PropertyGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
- <DefineConstants>$(DefineConstants);NETSTANDARD2_0;__CORE__</DefineConstants>
- </PropertyGroup>
-
- <PropertyGroup Condition="'$(TargetFramework)'=='net45'">
- <DefineConstants>$(DefineConstants);__WIN__</DefineConstants>
- </PropertyGroup>
-
- <PropertyGroup Condition="'$(TargetFramework)'=='net40'">
- <DefineConstants>$(DefineConstants);__WIN__;NET4</DefineConstants>
- </PropertyGroup>
-
- <PropertyGroup Condition="'$(Configuration)'=='Debug'">
- <DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- </PropertyGroup>
-
- <PropertyGroup Condition="'$(Configuration)'=='Release'">
- <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
- </PropertyGroup>
-
- <ItemGroup Condition="'$(TargetFramework)'=='net45'">
- <Reference Include="System.IO.Compression" />
- <Reference Include="System.Net.Http" />
- <Reference Include="System.ServiceProcess" />
- <Reference Include="System.Web" />
- <Reference Include="System.Web.Extensions" />
- <Reference Include="System.Windows.Forms" />
- </ItemGroup>
-
- <ItemGroup Condition="'$(TargetFramework)'=='net40'">
- <Reference Include="System.ServiceProcess" />
- <Reference Include="System.Web" />
- <Reference Include="System.Web.Extensions" />
- <Reference Include="System.Windows.Forms" />
- </ItemGroup>
-
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <TargetFrameworks>net45;netstandard2.0;net40;net46;netstandard2.1</TargetFrameworks>
+ <AssemblyName>NewLife.Core</AssemblyName>
+ <RootNamespace>NewLife</RootNamespace>
+ <AssemblyTitle>新生命X组件核心库</AssemblyTitle>
+ <Description>算法、日志、网络、RPC、序列化、缓存、Windows服务、线程池</Description>
+ <Company>新生命开发团队</Company>
+ <Copyright>©2002-2019 新生命开发团队</Copyright>
+ <Version>8.3.2019.0923</Version>
+ <FileVersion>8.3.2019.0923</FileVersion>
+ <AssemblyVersion>8.3.*</AssemblyVersion>
+ <Deterministic>false</Deterministic>
+ <OutputPath>..\..\Bin</OutputPath>
+ <DocumentationFile>$(OutputPath)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <DefineConstants>TRACE</DefineConstants>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <PackageId>$(AssemblyName)</PackageId>
+ <Authors>$(Company)</Authors>
+ <ProjectUrl>https://github.com/NewLifeX</ProjectUrl>
+ <PackageIcon>logo.ico</PackageIcon>
+ <RepositoryUrl>https://github.com/NewLifeX/X</RepositoryUrl>
+ <RepositoryType>git</RepositoryType>
+ <PackageTags>新生命团队;X组件;NewLife;$(AssemblyName)</PackageTags>
+ <PackageReleaseNotes>增强TinyHttpClient</PackageReleaseNotes>
+ <AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
+ <PublishRepositoryUrl>true</PublishRepositoryUrl>
+ <EmbedUntrackedSources>true</EmbedUntrackedSources>
+ <IncludeSource>true</IncludeSource>
+ <LangVersion>latest</LangVersion>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
+ <DefineConstants>$(DefineConstants);STD20;NETSTANDARD2_0;__CORE__</DefineConstants>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(TargetFramework)'=='netstandard2.1'">
+ <DefineConstants>$(DefineConstants);STD21;NETSTANDARD2_1;__CORE__</DefineConstants>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(TargetFramework)'=='net45'">
+ <DefineConstants>$(DefineConstants);__WIN__</DefineConstants>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(TargetFramework)'=='net40'">
+ <DefineConstants>$(DefineConstants);__WIN__;NET4</DefineConstants>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(TargetFramework)'=='net46'">
+ <DefineConstants>$(DefineConstants);__WIN__;NET46</DefineConstants>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(Configuration)'=='Debug'">
+ <DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(Configuration)'=='Release'">
+ <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
+ </PropertyGroup>
+
+ <ItemGroup Condition="'$(TargetFramework)'=='net45' Or '$(TargetFramework)'=='net46'">
+ <Reference Include="System.IO.Compression" />
+ <Reference Include="System.Net.Http" />
+ <Reference Include="System.ServiceProcess" />
+ <Reference Include="System.Web" />
+ <Reference Include="System.Web.Extensions" />
+ <Reference Include="System.Windows.Forms" />
+ </ItemGroup>
+
+ <ItemGroup Condition="'$(TargetFramework)'=='net40'">
+ <Reference Include="System.ServiceProcess" />
+ <Reference Include="System.Web" />
+ <Reference Include="System.Web.Extensions" />
+ <Reference Include="System.Windows.Forms" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <Compile Remove="Http\HttpClient.cs" />
+ <Compile Remove="Http\HttpSession.cs" />
+ <Compile Remove="Net\WebSocketSession.cs" />
+ <Compile Remove="Properties\AssemblyInfo.cs" />
+ <Compile Remove="Reflection\EmitHelper.cs" />
+ <Compile Remove="Reflection\EmitReflect.cs" />
+ <Compile Remove="Web\Pager.cs" />
+ <Compile Remove="Web\WebHelper.cs" />
+ <Compile Remove="Windows\MySpeech.cs" />
+ <Compile Remove="发布NuGet.cs" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <None Remove="UpdateInfo.txt" />
+ <None Remove="X组件.txt" />
+ </ItemGroup>
+
<ItemGroup>
- <Compile Remove="Http\HttpClient.cs" />
- <Compile Remove="Http\HttpSession.cs" />
- <Compile Remove="Net\WebSocketSession.cs" />
- <Compile Remove="Properties\AssemblyInfo.cs" />
- <Compile Remove="Reflection\EmitHelper.cs" />
- <Compile Remove="Reflection\EmitReflect.cs" />
- <Compile Remove="Web\Pager.cs" />
- <Compile Remove="Web\WebHelper.cs" />
- <Compile Remove="Windows\MySpeech.cs" />
- <Compile Remove="发布NuGet.cs" />
- </ItemGroup>
-
- <ItemGroup>
- <None Remove="UpdateInfo.txt" />
- <None Remove="X组件.txt" />
- </ItemGroup>
-
- <ItemGroup>
- <EmbeddedResource Include="UpdateInfo.txt" />
- <EmbeddedResource Include="Windows\MySpeech.cs" />
- <EmbeddedResource Include="X组件.txt" />
- </ItemGroup>
-
+ <None Include="..\Doc\logo.ico" Link="logo.ico" Pack="true" PackagePath="\" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <EmbeddedResource Include="UpdateInfo.txt" />
+ <EmbeddedResource Include="Windows\MySpeech.cs" />
+ <EmbeddedResource Include="X组件.txt" />
+ </ItemGroup>
+
</Project>
\ No newline at end of file
diff --git a/NewLife.Core/Web/WebClientX.cs b/NewLife.Core/Web/WebClientX.cs
index 2696e4b..f128b9b 100644
--- a/NewLife.Core/Web/WebClientX.cs
+++ b/NewLife.Core/Web/WebClientX.cs
@@ -35,6 +35,8 @@ namespace NewLife.Web
{
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls;
}
+#elif STD21
+ ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
#else
try
{
diff --git a/Test/Test.csproj b/Test/Test.csproj
index 2b31303..1bd309e 100644
--- a/Test/Test.csproj
+++ b/Test/Test.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
- <TargetFrameworks>net45;netcoreapp2.1</TargetFrameworks>
+ <TargetFrameworks>net45;netcoreapp2.1;netcoreapp3.0</TargetFrameworks>
<OutputPath>..\..\Test\</OutputPath>
</PropertyGroup>
diff --git a/XCode/Build.tt b/XCode/Build.tt
index c5cba09..0ab4363 100644
--- a/XCode/Build.tt
+++ b/XCode/Build.tt
@@ -8,7 +8,8 @@
<#
// 设置当前工作目录
PathHelper.BaseDirectory = Host.ResolvePath(".");
- // 导入模型文件并生成实体类,模型文件、输出目录、命名空间、连接名
+ // 导入模型文件并生成实体类,模型文件、输出目录、命名空间、连接名、中文文件名
+ //EntityBuilder.Build(String xmlFile = null, String output = null, String nameSpace = null, String connName = null, Boolean? chineseFileName = true);
EntityBuilder.Build();
//var tables = DAL.ImportFrom("Company.Project.xml");
diff --git a/XCode/Code/EntityBuilder.cs b/XCode/Code/EntityBuilder.cs
index 9033376..728b921 100644
--- a/XCode/Code/EntityBuilder.cs
+++ b/XCode/Code/EntityBuilder.cs
@@ -45,7 +45,8 @@ namespace XCode.Code
/// <param name="output">输出目录</param>
/// <param name="nameSpace">命名空间</param>
/// <param name="connName">连接名</param>
- public static Int32 Build(String xmlFile = null, String output = null, String nameSpace = null, String connName = null, Boolean? chineseFileName = null)
+ /// <param name="chineseFileName">中文文件名</param>
+ public static Int32 Build(String xmlFile = null, String output = null, String nameSpace = null, String connName = null, Boolean? chineseFileName = true)
{
if (xmlFile.IsNullOrEmpty())
{
@@ -244,6 +245,7 @@ namespace XCode.Code
/// <summary>保存</summary>
/// <param name="ext"></param>
/// <param name="overwrite"></param>
+ /// <param name="chineseFileName"></param>
public override String Save(String ext = null, Boolean overwrite = true, Boolean chineseFileName = true)
{
if (ext.IsNullOrEmpty() && Business)
diff --git a/XCode/XCode.csproj b/XCode/XCode.csproj
index f0b1e80..f116b82 100644
--- a/XCode/XCode.csproj
+++ b/XCode/XCode.csproj
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>net45;netstandard2.0;net40</TargetFrameworks>
+ <TargetFrameworks>net45;netstandard2.0;net40;net46;netstandard2.1</TargetFrameworks>
<AssemblyName>XCode</AssemblyName>
<RootNamespace>XCode</RootNamespace>
<AssemblyTitle>数据中间件</AssemblyTitle>
<Description>数据中间件,MySQL、SQLite、SqlServer、Oracle</Description>
<Company>新生命开发团队</Company>
<Copyright>©2002-2019 新生命开发团队</Copyright>
- <Version>9.14.2019.0822</Version>
- <FileVersion>9.14.2019.0822</FileVersion>
+ <Version>9.14.2019.0923</Version>
+ <FileVersion>9.14.2019.0923</FileVersion>
<AssemblyVersion>9.14.*</AssemblyVersion>
<Deterministic>false</Deterministic>
<OutputPath>..\..\Bin</OutputPath>
@@ -22,7 +22,7 @@
<PackageId>NewLife.XCode</PackageId>
<Authors>$(Company)</Authors>
<ProjectUrl>https://github.com/NewLifeX</ProjectUrl>
- <PackageIconUrl>http://www.NewLifeX.com/logo.png</PackageIconUrl>
+ <PackageIcon>logo.ico</PackageIcon>
<RepositoryUrl>https://github.com/NewLifeX/X</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>新生命团队;X组件;NewLife;$(AssemblyName)</PackageTags>
@@ -32,7 +32,8 @@
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSource>true</IncludeSource>
<LangVersion>latest</LangVersion>
- </PropertyGroup>
+
+</PropertyGroup>
<ItemGroup>
<Compile Remove="build\**" />
@@ -44,7 +45,11 @@
</ItemGroup>
<PropertyGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
- <DefineConstants>$(DefineConstants);NETSTANDARD2_0;__CORE__</DefineConstants>
+ <DefineConstants>$(DefineConstants);STD20;NETSTANDARD2_0;__CORE__</DefineConstants>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(TargetFramework)'=='netstandard2.1'">
+ <DefineConstants>$(DefineConstants);STD21;NETSTANDARD2_1;__CORE__</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)'=='net45'">
@@ -55,6 +60,10 @@
<DefineConstants>$(DefineConstants);__WIN__;NET4</DefineConstants>
</PropertyGroup>
+ <PropertyGroup Condition="'$(TargetFramework)'=='net46'">
+ <DefineConstants>$(DefineConstants);__WIN__;NET46</DefineConstants>
+ </PropertyGroup>
+
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
<DebugType>full</DebugType>
@@ -65,13 +74,7 @@
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetFramework)'=='net45'">
- <Reference Include="System.Data" />
- <Reference Include="System.Web" />
- <Reference Include="System.Web.Extensions" />
- </ItemGroup>
-
- <ItemGroup Condition="'$(TargetFramework)'=='net40'">
+ <ItemGroup Condition="'$(TargetFramework)'=='net40' Or '$(TargetFramework)'=='net45' Or '$(TargetFramework)'=='net46'">
<Reference Include="System.Data" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
@@ -112,6 +115,10 @@
</ItemGroup>
<ItemGroup>
+ <None Include="..\Doc\logo.ico" Link="logo.ico" Pack="true" PackagePath="\" />
+ </ItemGroup>
+
+ <ItemGroup>
<None Update="Membership\生成实体类.log">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>