diff --git a/Apewer.Source/Apewer.Source.csproj b/Apewer.Source/Apewer.Source.csproj index 922a466..010b8c3 100644 --- a/Apewer.Source/Apewer.Source.csproj +++ b/Apewer.Source/Apewer.Source.csproj @@ -1,30 +1,19 @@  - + - $(DefineConstants);SOURCE; - Library + SOURCE;$(DefineConstants); + MYSQL_6_10;$(DefineConstants); + MYSQL_6_9;$(DefineConstants); netstandard2.0;net40;net20 - - Apewer.Source - - Apewer.Source - Apewer - Apewer.Source - - - - - $(DefineConstants);MYSQL_6_10; - @@ -32,38 +21,9 @@ - - - $(DefineConstants);MYSQL_6_9; - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Apewer.Source/Externals/MySql.Data-6.9.11/MySqlClient/MysqlDefs.cs b/Apewer.Source/Externals/MySql.Data-6.9.11/MySqlClient/MysqlDefs.cs index a91dacd..a2200d5 100644 --- a/Apewer.Source/Externals/MySql.Data-6.9.11/MySqlClient/MysqlDefs.cs +++ b/Apewer.Source/Externals/MySql.Data-6.9.11/MySqlClient/MysqlDefs.cs @@ -517,17 +517,17 @@ namespace Externals.MySql.Data.MySqlClient get { string os = string.Empty; - try - { - var searcher = new System.Management.ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem"); - var collection = searcher.Get(); - foreach (var mgtObj in collection) - { - os = mgtObj.GetPropertyValue("Caption").ToString(); - break; - } - } - catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } + // try + // { + // var searcher = new System.Management.ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem"); + // var collection = searcher.Get(); + // foreach (var mgtObj in collection) + // { + // os = mgtObj.GetPropertyValue("Caption").ToString(); + // break; + // } + // } + // catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } return os; } diff --git a/Apewer.Source/Source/SqlClient.cs b/Apewer.Source/Source/SqlClient.cs index 2fbe2e3..2567f29 100644 --- a/Apewer.Source/Source/SqlClient.cs +++ b/Apewer.Source/Source/SqlClient.cs @@ -1,12 +1,10 @@ /* 2021.11.07 */ using Apewer; -using Apewer.Source; using System; using System.Collections.Generic; using System.Data; using System.Data.Common; -using System.Net; using System.Text; using static Apewer.Source.OrmHelper; @@ -219,8 +217,9 @@ namespace Apewer.Source try { - using (var command = new SqlCommand()) + using (var adapter = new SqlDataAdapter()) { + var command = adapter.SelectCommand; command.Connection = _db; command.CommandTimeout = _timeout.Query; command.CommandText = sql; @@ -233,13 +232,10 @@ namespace Apewer.Source } using (var ds = new DataSet()) { - using (var da = new SqlDataAdapter(sql, _db)) - { - var name = "table_" + Guid.NewGuid().ToString("n"); - da.Fill(ds, name); - var table = ds.Tables[name]; - return new Query(table, true); - } + var srcTable = "table_" + Guid.NewGuid().ToString("n"); + adapter.Fill(ds, srcTable); + var table = ds.Tables[srcTable]; + return new Query(table, true); } } } diff --git a/Apewer.Web/Apewer.Web.csproj b/Apewer.Web/Apewer.Web.csproj index 50cc2ee..5ce43fe 100644 --- a/Apewer.Web/Apewer.Web.csproj +++ b/Apewer.Web/Apewer.Web.csproj @@ -1,19 +1,10 @@  - + - $(DefineConstants);WEB; - Library - net40;net20;netcoreapp3.1 - - - - Apewer.Web - - Apewer.Web - Apewer - Apewer.Web + WEB;$(DefineConstants); + netcoreapp3.1;net40;net20 @@ -25,22 +16,10 @@ - - - - - - - - - - - - - - - - + + + + diff --git a/Apewer.Windows/Apewer.Windows.csproj b/Apewer.Windows/Apewer.Windows.csproj index 388d024..e433f3f 100644 --- a/Apewer.Windows/Apewer.Windows.csproj +++ b/Apewer.Windows/Apewer.Windows.csproj @@ -1,28 +1,25 @@ - + - + CS0108;CS0612 - Library net461;net40;net20;netcoreapp3.1 - - Apewer.Windows - - Apewer.Windows - Apewer - Apewer.Windows - - - - - + + + + + + + + + diff --git a/Apewer/Apewer.csproj b/Apewer/Apewer.csproj index 6a5ab60..7d9403c 100644 --- a/Apewer/Apewer.csproj +++ b/Apewer/Apewer.csproj @@ -1,20 +1,11 @@  - + - Library netstandard2.1;netstandard2.0;netcoreapp3.1;net461;net40;net20 - - Apewer - - Apewer - Apewer - Apewer - - NETSTD;HAVE_ASYNC;HAVE_BIG_INTEGER;$(DefineConstants);$(AdditionalConstants) diff --git a/Apewer/_Common.props b/Apewer/_Common.props deleted file mode 100644 index 38d8eee..0000000 --- a/Apewer/_Common.props +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - true - - bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml - latest - - - - - - Apewer Libraries - 6.5.3 - - - - - true - ..\ - true - - - - - $(AssemblyName) - .NET Standard 2.1 - NETSTD;$(DefineConstants);$(AdditionalConstants) - - - - - $(AssemblyName) - .NET Standard 2.0 - NETSTD;$(DefineConstants);$(AdditionalConstants) - - - - - $(AssemblyName) - .NET Framework 2.0 - NETFX;NET20;$(DefineConstants);$(AdditionalConstants) - - - - - $(AssemblyName) - .NET Framework 4.0 - NETFX;NET40;$(DefineConstants);$(AdditionalConstants) - - - - - $(AssemblyName) - .NET Framework 4.6.1 - NETFX;NET461;NET45;$(DefineConstants);$(AdditionalConstants) - - - - - $(AssemblyName) - .NET Core 3.1 - NETCORE;$(DefineConstants);$(AdditionalConstants) - - - - - - - - - - - \ No newline at end of file diff --git a/Apewer/_Extensions.cs b/Apewer/_Extensions.cs index ecd808a..d5b025f 100644 --- a/Apewer/_Extensions.cs +++ b/Apewer/_Extensions.cs @@ -218,7 +218,7 @@ public static class Extensions_Apewer public static long Stamp(this DateTime @this, bool byMilliseconds = true) => ClockUtility.Stamp(@this, byMilliseconds); /// 转换为易于阅读的文本。 - /// 格式:1970- + /// 格式:1970-01-01 00:00:00.000 public static string Lucid(this DateTime @this, bool date = true, bool time = true, bool seconds = true, bool milliseconds = true) => ClockUtility.Lucid(@this, date, time, seconds, milliseconds); /// 转换为紧凑的文本。 diff --git a/ChangeLog.md b/ChangeLog.md index 43821c8..ff69f2d 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,6 +1,9 @@  ### 最新提交 +### 6.5.4 +- Source:调整了 SqlClient 的查询超时设置。 + ### 6.5.3 - Source:修正代码错误。