From 80c3fc9a26cf2653c8449d9a1f2f772de8170216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E6=98=8E=E9=94=8B?= Date: Fri, 6 Sep 2024 10:04:40 +0800 Subject: [PATCH] =?UTF-8?q?nuget:=20=E7=89=88=E6=9C=AC=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=88=B08.08=EF=BC=8C=E4=BD=BF=E7=94=A8=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E9=80=9A=E9=85=8D=E7=AC=A6=E9=85=8D=E7=BD=AE=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E5=BA=93=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/OSharpNS.nuspec | 22 +++++----- build/version.props | 10 ++--- .../Liuliu.Demo.Web/Liuliu.Demo.Web.csproj | 8 ++-- .../Liuliu.Demo.WebApi.csproj | 20 +++++----- .../OSharp.CodeGeneration.csproj | 4 +- .../OSharp.CodeGenerator.csproj | 14 +++---- .../OSharp.AspNetCore.csproj | 18 ++++----- .../OSharp.AutoMapper.csproj | 2 +- .../OSharp.EntityFrameworkCore.MySql.csproj | 6 +-- .../OSharp.EntityFrameworkCore.Oracle.csproj | 6 +-- ...harp.EntityFrameworkCore.PostgreSql.csproj | 6 +-- ...Sharp.EntityFrameworkCore.SqlServer.csproj | 6 +-- .../OSharp.EntityFrameworkCore.Sqlite.csproj | 6 +-- .../OSharp.EntityFrameworkCore.csproj | 20 +++++----- .../OSharp.Exceptionless.csproj | 2 +- src/OSharp.Hangfire/OSharp.Hangfire.csproj | 4 +- .../OSharp.Hosting.Apis.csproj | 8 ++-- .../OSharp.Hosting.Core.csproj | 4 +- .../Authentication/AuthenticationPackBase.cs | 14 +++---- src/OSharp.Identity/OSharp.Identity.csproj | 15 +++---- src/OSharp.Log4Net/OSharp.Log4Net.csproj | 2 +- .../OSharp.MiniProfiler.csproj | 4 +- src/OSharp.NLog/OSharp.NLog.csproj | 2 +- src/OSharp.Redis/OSharp.Redis.csproj | 6 +-- src/OSharp.Swagger/OSharp.Swagger.csproj | 2 +- src/OSharp.Utils/OSharp.Utils.csproj | 40 +++++++++---------- src/OSharp.Wpf/OSharp.Wpf.csproj | 12 +++--- src/OSharp/Core/Systems/KeyValueStore.cs | 20 +++++----- src/OSharp/OSharp.csproj | 2 +- 29 files changed, 141 insertions(+), 144 deletions(-) diff --git a/build/OSharpNS.nuspec b/build/OSharpNS.nuspec index 67b470b8..1c70d539 100644 --- a/build/OSharpNS.nuspec +++ b/build/OSharpNS.nuspec @@ -2,7 +2,7 @@ OSharpNS - 8.0.1-preview.501 + 8.0.8 OSharpFramework(.NET6.0/.NETCoreApp3.1) 柳柳软件(66soft.net) LiuliuSoft nnc @@ -16,18 +16,18 @@ osharp - - - - - + + + + + - - - - - + + + + + diff --git a/build/version.props b/build/version.props index 7a30763e..089b8fd0 100644 --- a/build/version.props +++ b/build/version.props @@ -1,12 +1,12 @@ 8.0 - 1 + 8 -preview. 529 - $(VersionMain).$(VersionPrefix)$(VersionSuffix)$(VersionSuffixVersion) - $(VersionMain).$(VersionPrefix).$(VersionSuffixVersion) - + + $(VersionMain).$(VersionPrefix) + $(VersionMain).$(VersionPrefix) diff --git a/samples/web/Liuliu.Demo.Web/Liuliu.Demo.Web.csproj b/samples/web/Liuliu.Demo.Web/Liuliu.Demo.Web.csproj index a336aa8d..06379256 100644 --- a/samples/web/Liuliu.Demo.Web/Liuliu.Demo.Web.csproj +++ b/samples/web/Liuliu.Demo.Web/Liuliu.Demo.Web.csproj @@ -14,15 +14,15 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/samples/web/Liuliu.Demo.WebApi/Liuliu.Demo.WebApi.csproj b/samples/web/Liuliu.Demo.WebApi/Liuliu.Demo.WebApi.csproj index 0f22b184..db3a74dc 100644 --- a/samples/web/Liuliu.Demo.WebApi/Liuliu.Demo.WebApi.csproj +++ b/samples/web/Liuliu.Demo.WebApi/Liuliu.Demo.WebApi.csproj @@ -21,30 +21,30 @@ - + - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/samples/wpf/OSharp.CodeGeneration/OSharp.CodeGeneration.csproj b/samples/wpf/OSharp.CodeGeneration/OSharp.CodeGeneration.csproj index be835b7c..0c8d05ed 100644 --- a/samples/wpf/OSharp.CodeGeneration/OSharp.CodeGeneration.csproj +++ b/samples/wpf/OSharp.CodeGeneration/OSharp.CodeGeneration.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/samples/wpf/OSharp.CodeGenerator/OSharp.CodeGenerator.csproj b/samples/wpf/OSharp.CodeGenerator/OSharp.CodeGenerator.csproj index c4f677ef..330356ee 100644 --- a/samples/wpf/OSharp.CodeGenerator/OSharp.CodeGenerator.csproj +++ b/samples/wpf/OSharp.CodeGenerator/OSharp.CodeGenerator.csproj @@ -14,16 +14,16 @@ - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/src/OSharp.AspNetCore/OSharp.AspNetCore.csproj b/src/OSharp.AspNetCore/OSharp.AspNetCore.csproj index 80ba8515..a4261d78 100644 --- a/src/OSharp.AspNetCore/OSharp.AspNetCore.csproj +++ b/src/OSharp.AspNetCore/OSharp.AspNetCore.csproj @@ -16,19 +16,19 @@ - - - + + + - - - + + + - - - + + + diff --git a/src/OSharp.AutoMapper/OSharp.AutoMapper.csproj b/src/OSharp.AutoMapper/OSharp.AutoMapper.csproj index e9fd8129..9c93a4aa 100644 --- a/src/OSharp.AutoMapper/OSharp.AutoMapper.csproj +++ b/src/OSharp.AutoMapper/OSharp.AutoMapper.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/OSharp.EntityFrameworkCore.MySql/OSharp.EntityFrameworkCore.MySql.csproj b/src/OSharp.EntityFrameworkCore.MySql/OSharp.EntityFrameworkCore.MySql.csproj index 667e8845..d4bad59b 100644 --- a/src/OSharp.EntityFrameworkCore.MySql/OSharp.EntityFrameworkCore.MySql.csproj +++ b/src/OSharp.EntityFrameworkCore.MySql/OSharp.EntityFrameworkCore.MySql.csproj @@ -12,13 +12,13 @@ - + - + - + diff --git a/src/OSharp.EntityFrameworkCore.Oracle/OSharp.EntityFrameworkCore.Oracle.csproj b/src/OSharp.EntityFrameworkCore.Oracle/OSharp.EntityFrameworkCore.Oracle.csproj index d30781ad..e2cca3b9 100644 --- a/src/OSharp.EntityFrameworkCore.Oracle/OSharp.EntityFrameworkCore.Oracle.csproj +++ b/src/OSharp.EntityFrameworkCore.Oracle/OSharp.EntityFrameworkCore.Oracle.csproj @@ -12,13 +12,13 @@ - + - + - + diff --git a/src/OSharp.EntityFrameworkCore.PostgreSql/OSharp.EntityFrameworkCore.PostgreSql.csproj b/src/OSharp.EntityFrameworkCore.PostgreSql/OSharp.EntityFrameworkCore.PostgreSql.csproj index 43d0d345..d6607d2e 100644 --- a/src/OSharp.EntityFrameworkCore.PostgreSql/OSharp.EntityFrameworkCore.PostgreSql.csproj +++ b/src/OSharp.EntityFrameworkCore.PostgreSql/OSharp.EntityFrameworkCore.PostgreSql.csproj @@ -12,13 +12,13 @@ - + - + - + diff --git a/src/OSharp.EntityFrameworkCore.SqlServer/OSharp.EntityFrameworkCore.SqlServer.csproj b/src/OSharp.EntityFrameworkCore.SqlServer/OSharp.EntityFrameworkCore.SqlServer.csproj index bd226cb1..2b483974 100644 --- a/src/OSharp.EntityFrameworkCore.SqlServer/OSharp.EntityFrameworkCore.SqlServer.csproj +++ b/src/OSharp.EntityFrameworkCore.SqlServer/OSharp.EntityFrameworkCore.SqlServer.csproj @@ -12,13 +12,13 @@ - + - + - + diff --git a/src/OSharp.EntityFrameworkCore.Sqlite/OSharp.EntityFrameworkCore.Sqlite.csproj b/src/OSharp.EntityFrameworkCore.Sqlite/OSharp.EntityFrameworkCore.Sqlite.csproj index 8f6a232a..5f82fb11 100644 --- a/src/OSharp.EntityFrameworkCore.Sqlite/OSharp.EntityFrameworkCore.Sqlite.csproj +++ b/src/OSharp.EntityFrameworkCore.Sqlite/OSharp.EntityFrameworkCore.Sqlite.csproj @@ -12,13 +12,13 @@ - + - + - + diff --git a/src/OSharp.EntityFrameworkCore/OSharp.EntityFrameworkCore.csproj b/src/OSharp.EntityFrameworkCore/OSharp.EntityFrameworkCore.csproj index bd65ae5c..d52fd582 100644 --- a/src/OSharp.EntityFrameworkCore/OSharp.EntityFrameworkCore.csproj +++ b/src/OSharp.EntityFrameworkCore/OSharp.EntityFrameworkCore.csproj @@ -13,22 +13,22 @@ - + - - - + + + - - - + + + - - - + + + diff --git a/src/OSharp.Exceptionless/OSharp.Exceptionless.csproj b/src/OSharp.Exceptionless/OSharp.Exceptionless.csproj index 7b1c1960..f82c139b 100644 --- a/src/OSharp.Exceptionless/OSharp.Exceptionless.csproj +++ b/src/OSharp.Exceptionless/OSharp.Exceptionless.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/OSharp.Hangfire/OSharp.Hangfire.csproj b/src/OSharp.Hangfire/OSharp.Hangfire.csproj index 969c1756..7e473b73 100644 --- a/src/OSharp.Hangfire/OSharp.Hangfire.csproj +++ b/src/OSharp.Hangfire/OSharp.Hangfire.csproj @@ -11,8 +11,8 @@ - - + + diff --git a/src/OSharp.Hosting.Apis/OSharp.Hosting.Apis.csproj b/src/OSharp.Hosting.Apis/OSharp.Hosting.Apis.csproj index 32db2b19..293e8a43 100644 --- a/src/OSharp.Hosting.Apis/OSharp.Hosting.Apis.csproj +++ b/src/OSharp.Hosting.Apis/OSharp.Hosting.Apis.csproj @@ -17,16 +17,16 @@ - + - + - + - + diff --git a/src/OSharp.Hosting.Core/OSharp.Hosting.Core.csproj b/src/OSharp.Hosting.Core/OSharp.Hosting.Core.csproj index a902e2ef..e32422f7 100644 --- a/src/OSharp.Hosting.Core/OSharp.Hosting.Core.csproj +++ b/src/OSharp.Hosting.Core/OSharp.Hosting.Core.csproj @@ -12,8 +12,8 @@ - - + + diff --git a/src/OSharp.Identity/Authentication/AuthenticationPackBase.cs b/src/OSharp.Identity/Authentication/AuthenticationPackBase.cs index b12a5800..1cf2a7a4 100644 --- a/src/OSharp.Identity/Authentication/AuthenticationPackBase.cs +++ b/src/OSharp.Identity/Authentication/AuthenticationPackBase.cs @@ -187,13 +187,13 @@ protected virtual AuthenticationBuilder AddOAuth2(IServiceCollection services, A opts.ClientSecret = options.ClientSecret; }); break; - case "GitHub": - builder.AddGitHub(opts => - { - opts.ClientId = options.ClientId; - opts.ClientSecret = options.ClientSecret; - }); - break; + //case "GitHub": + // builder.AddGitHub(opts => + // { + // opts.ClientId = options.ClientId; + // opts.ClientSecret = options.ClientSecret; + // }); + // break; } } diff --git a/src/OSharp.Identity/OSharp.Identity.csproj b/src/OSharp.Identity/OSharp.Identity.csproj index d1a8ac58..3cec36c0 100644 --- a/src/OSharp.Identity/OSharp.Identity.csproj +++ b/src/OSharp.Identity/OSharp.Identity.csproj @@ -17,20 +17,17 @@ - - - - - + + - - + + - - + + diff --git a/src/OSharp.Log4Net/OSharp.Log4Net.csproj b/src/OSharp.Log4Net/OSharp.Log4Net.csproj index 8d84f50f..f113a07f 100644 --- a/src/OSharp.Log4Net/OSharp.Log4Net.csproj +++ b/src/OSharp.Log4Net/OSharp.Log4Net.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/OSharp.MiniProfiler/OSharp.MiniProfiler.csproj b/src/OSharp.MiniProfiler/OSharp.MiniProfiler.csproj index f696a267..bc1eda93 100644 --- a/src/OSharp.MiniProfiler/OSharp.MiniProfiler.csproj +++ b/src/OSharp.MiniProfiler/OSharp.MiniProfiler.csproj @@ -11,8 +11,8 @@ - - + + diff --git a/src/OSharp.NLog/OSharp.NLog.csproj b/src/OSharp.NLog/OSharp.NLog.csproj index c9d3f7b5..e637e706 100644 --- a/src/OSharp.NLog/OSharp.NLog.csproj +++ b/src/OSharp.NLog/OSharp.NLog.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/OSharp.Redis/OSharp.Redis.csproj b/src/OSharp.Redis/OSharp.Redis.csproj index d7b2d9a2..77d51c56 100644 --- a/src/OSharp.Redis/OSharp.Redis.csproj +++ b/src/OSharp.Redis/OSharp.Redis.csproj @@ -11,13 +11,13 @@ - + - + - + diff --git a/src/OSharp.Swagger/OSharp.Swagger.csproj b/src/OSharp.Swagger/OSharp.Swagger.csproj index 910342da..7ad52d3e 100644 --- a/src/OSharp.Swagger/OSharp.Swagger.csproj +++ b/src/OSharp.Swagger/OSharp.Swagger.csproj @@ -19,7 +19,7 @@ - + diff --git a/src/OSharp.Utils/OSharp.Utils.csproj b/src/OSharp.Utils/OSharp.Utils.csproj index 9f81d7d5..7dd268a4 100644 --- a/src/OSharp.Utils/OSharp.Utils.csproj +++ b/src/OSharp.Utils/OSharp.Utils.csproj @@ -15,27 +15,27 @@ - - + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/src/OSharp.Wpf/OSharp.Wpf.csproj b/src/OSharp.Wpf/OSharp.Wpf.csproj index 77ac944b..f0cde2a8 100644 --- a/src/OSharp.Wpf/OSharp.Wpf.csproj +++ b/src/OSharp.Wpf/OSharp.Wpf.csproj @@ -17,18 +17,18 @@ - - - + + + - + - + - + diff --git a/src/OSharp/Core/Systems/KeyValueStore.cs b/src/OSharp/Core/Systems/KeyValueStore.cs index 2c1de32f..2ab9b16e 100644 --- a/src/OSharp/Core/Systems/KeyValueStore.cs +++ b/src/OSharp/Core/Systems/KeyValueStore.cs @@ -46,7 +46,7 @@ public KeyValueStore(IServiceProvider provider) Type type = typeof(TSetting); foreach (PropertyInfo property in type.GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(m => m.PropertyType == typeof(IKeyValue))) { - string key = ((KeyValue)property.GetValue(setting)).Key; + string key = ((KeyValue)property.GetValue(setting))?.Key; IKeyValue keyValue = GetByKey(key); if (keyValue != null) { @@ -78,7 +78,7 @@ public async Task SaveSetting(ISetting setting) public IKeyValue[] GetByRootKey(string rootKey) { string[] keys = GetKeys(rootKey); - return keys.Select(key => GetByKey(key)).Where(value => value != null).ToArray(); + return keys.Select(GetByKey).Where(value => value != null).ToArray(); } /// @@ -103,7 +103,7 @@ public IKeyValue GetByKey(string key) /// 检查谓语表达式 /// 更新的键值对信息编号 /// 键值对信息是否存在 - public Task CheckExists(Expression> predicate, Guid id = default(Guid)) + public Task CheckExists(Expression> predicate, Guid id = default) { return KeyValueRepository.CheckExistsAsync(predicate, id); } @@ -158,10 +158,10 @@ public async Task CreateOrUpdate(params IKeyValue[] dtos) } } - unitOfWork.Commit(); + await unitOfWork.CommitAsync(); - string[] cacheKeys = removeKeys.Select(m => GetCacheKey(m)).ToArray(); - await Cache.RemoveAsync(cacheKeys); + string[] cacheKeys = removeKeys.Select(GetCacheKey).ToArray(); + await Cache.RemoveAsync(default, cacheKeys); return OperationResult.Success; } @@ -194,10 +194,10 @@ public async Task Delete(params Guid[] ids) removeKeys.AddIf(pair.Key, count > 0); } - unitOfWork.Commit(); + await unitOfWork.CommitAsync(); - string[] cacheKeys = removeKeys.Select(m => GetCacheKey(m)).ToArray(); - await Cache.RemoveAsync(cacheKeys); + string[] cacheKeys = removeKeys.Select(GetCacheKey).ToArray(); + await Cache.RemoveAsync(default, cacheKeys); return OperationResult.Success; } @@ -224,4 +224,4 @@ private static string GetCacheKey(string key) { return $"Systems:KeyValues:{key}"; } -} \ No newline at end of file +} diff --git a/src/OSharp/OSharp.csproj b/src/OSharp/OSharp.csproj index 96064968..885342d7 100644 --- a/src/OSharp/OSharp.csproj +++ b/src/OSharp/OSharp.csproj @@ -13,7 +13,7 @@ - +