Skip to content

Commit 3306ffe

Browse files
authored
Merge pull request #72 from bing-framework/dev_v6.0
Dev v6.0
2 parents 81acf61 + f3fc834 commit 3306ffe

File tree

98 files changed

+4497
-1545
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+4497
-1545
lines changed

Bing.All.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "02-Logging", "02-Logging",
372372
EndProject
373373
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bing.Logging.Serilog.Tests.Integration", "framework\tests\Bing.Logging.Serilog.Tests.Integration\Bing.Logging.Serilog.Tests.Integration.csproj", "{8A06784C-1C60-C922-5B03-6A47057B5308}"
374374
EndProject
375+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bing.Caching.CSRedis.Tests.Integration", "framework\tests\Bing.Caching.CSRedis.Tests.Integration\Bing.Caching.CSRedis.Tests.Integration.csproj", "{67B838C5-A130-4384-A97C-A858A2A007F2}"
376+
EndProject
375377
Global
376378
GlobalSection(SolutionConfigurationPlatforms) = preSolution
377379
Debug|Any CPU = Debug|Any CPU
@@ -834,6 +836,10 @@ Global
834836
{8A06784C-1C60-C922-5B03-6A47057B5308}.Debug|Any CPU.Build.0 = Debug|Any CPU
835837
{8A06784C-1C60-C922-5B03-6A47057B5308}.Release|Any CPU.ActiveCfg = Release|Any CPU
836838
{8A06784C-1C60-C922-5B03-6A47057B5308}.Release|Any CPU.Build.0 = Release|Any CPU
839+
{67B838C5-A130-4384-A97C-A858A2A007F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
840+
{67B838C5-A130-4384-A97C-A858A2A007F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
841+
{67B838C5-A130-4384-A97C-A858A2A007F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
842+
{67B838C5-A130-4384-A97C-A858A2A007F2}.Release|Any CPU.Build.0 = Release|Any CPU
837843
EndGlobalSection
838844
GlobalSection(SolutionProperties) = preSolution
839845
HideSolutionNode = FALSE
@@ -1003,6 +1009,7 @@ Global
10031009
{F339B49B-E2F8-44CA-AD66-5E6CAA1B6E0F} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
10041010
{59928279-A0DE-4DCB-9032-1BADE8A1E00B} = {5C7976B4-C243-41B9-8303-8E8FAE099D31}
10051011
{8A06784C-1C60-C922-5B03-6A47057B5308} = {59928279-A0DE-4DCB-9032-1BADE8A1E00B}
1012+
{67B838C5-A130-4384-A97C-A858A2A007F2} = {52F64CF7-927F-4D55-A908-9E2239B4E5AB}
10061013
EndGlobalSection
10071014
GlobalSection(ExtensibilityGlobals) = postSolution
10081015
SolutionGuid = {C1202A0F-83CC-4602-BCE5-20CB640BCAD4}

README.md

Lines changed: 60 additions & 42 deletions
Large diffs are not rendered by default.

framework.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@
66

77
<Import Project="./common.props"/>
88

9-
109
</Project>

framework.tests.props

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,36 @@
11
<Project>
22
<PropertyGroup>
3-
<TargetFrameworks>net9.0;net8.0;net7.0;net6.0;net5.0;netcoreapp3.1;</TargetFrameworks>
3+
<TargetFrameworks>net9.0;net8.0;net6.0;</TargetFrameworks>
44
</PropertyGroup>
55

66
<Import Project="./common.tests.props"/>
77

8+
<PropertyGroup>
9+
<!-- 如果没有DI的需求,则将EnableDITestPackages设置为false -->
10+
<EnableDITestPackages>true</EnableDITestPackages>
11+
</PropertyGroup>
12+
13+
<ItemGroup Condition=" '$(EnableDITestPackages)' == 'true' ">
14+
<PackageReference Include="Xunit.DependencyInjection.Logging" Version="8.1.0" />
15+
<PackageReference Include="AspectCore.Extensions.Hosting" Version="2.4.0" />
16+
</ItemGroup>
17+
18+
<ItemGroup Condition="'$(EnableDITestPackages)' == 'true' and '$(TargetFramework)' == 'net6.0' ">
19+
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="6.0.36" />
20+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
21+
<PackageReference Include="Xunit.DependencyInjection" Version="8.9.0" />
22+
</ItemGroup>
23+
24+
<ItemGroup Condition=" '$(EnableDITestPackages)' == 'true' and '$(TargetFramework)' == 'net8.0' ">
25+
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.16" />
26+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
27+
<PackageReference Include="Xunit.DependencyInjection" Version="9.9.0" />
28+
</ItemGroup>
29+
30+
<ItemGroup Condition=" '$(EnableDITestPackages)' == 'true' and '$(TargetFramework)' == 'net9.0' ">
31+
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="9.0.5" />
32+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.5" />
33+
<PackageReference Include="Xunit.DependencyInjection" Version="9.9.0" />
34+
</ItemGroup>
35+
836
</Project>

framework/Publish.bat

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,13 @@ dotnet pack src/Bing.Validation -c Release -o nuget_pub
2626
::Security
2727
dotnet pack src/Bing.Security -c Release -o nuget_pub
2828

29-
::Logs
30-
dotnet pack src/Bing.Logs -c Release -o nuget_pub
31-
dotnet pack src/Bing.Logs.Exceptionless -c Release -o nuget_pub
32-
dotnet pack src/Bing.Logs.Log4Net -c Release -o nuget_pub
33-
dotnet pack src/Bing.Logs.NLog -c Release -o nuget_pub
34-
dotnet pack src/Bing.Logs.Serilog -c Release -o nuget_pub
35-
3629
::Logging
3730
dotnet pack src/Bing.Logging -c Release -o nuget_pub
3831
dotnet pack src/Bing.Logging.Serilog -c Release -o nuget_pub
3932
dotnet pack src/Bing.Logging.Sinks.Exceptionless -c Release -o nuget_pub
4033

4134
::Localization
42-
dotnet pack src/Bing.Localization.Abstractions-c Release -o nuget_pub
35+
dotnet pack src/Bing.Localization.Abstractions -c Release -o nuget_pub
4336
dotnet pack src/Bing.Localization -c Release -o nuget_pub
4437

4538
::Data

framework/src/Bing.Aop.AspectCore/Bing.Aop.AspectCore.csproj

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,13 @@
1111
<ProjectReference Include="..\Bing.Core\Bing.Core.csproj" />
1212
</ItemGroup>
1313

14-
<Import Project="dependency.props" />
14+
<PropertyGroup>
15+
<Aspect-RefVersion>2.4.0</Aspect-RefVersion>
16+
</PropertyGroup>
17+
18+
<ItemGroup>
19+
<PackageReference Include="AspectCore.Extensions.AspectScope" Version="$(Aspect-RefVersion)" />
20+
<PackageReference Include="AspectCore.Extensions.Configuration" Version="$(Aspect-RefVersion)" />
21+
<PackageReference Include="AspectCore.Extensions.DependencyInjection" Version="$(Aspect-RefVersion)" />
22+
</ItemGroup>
1523
</Project>

framework/src/Bing.Aop.AspectCore/dependency.props

Lines changed: 0 additions & 11 deletions
This file was deleted.

framework/src/Bing.AspNetCore.Authentication.JwtBearer/Bing.AspNetCore.Authentication.JwtBearer.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
<ItemGroup>
1717
<ProjectReference Include="..\Bing.AspNetCore.Abstractions\Bing.AspNetCore.Abstractions.csproj" />
18+
<ProjectReference Include="..\Bing.Caching\Bing.Caching.csproj" />
1819
</ItemGroup>
1920

2021
<Import Project="..\..\..\common.props" />

framework/src/Bing.AspNetCore.Authentication.JwtBearer/Bing/Identity/JwtBearer/Internal/JsonWebTokenStore.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ internal sealed class JsonWebTokenStore : JsonWebTokenStoreBase, IJsonWebTokenSt
2020
public JsonWebTokenStore(ICache cache) => _cache = cache;
2121

2222
/// <inheritdoc />
23-
protected override async Task AddAsync<T>(string key, T value, TimeSpan? expiration = null) => await _cache.AddAsync(key, value, expiration);
23+
protected override async Task AddAsync<T>(string key, T value, TimeSpan? expiration = null) => await _cache.SetAsync(key, value, new CacheOptions { Expiration = expiration });
2424

2525
/// <inheritdoc />
2626
protected override async Task RemoveAsync(string key) => await _cache.RemoveAsync(key);

framework/src/Bing.AspNetCore.Authentication.JwtBearer/Bing/Identity/JwtBearer/Internal/TokenPayloadStore.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ internal sealed class TokenPayloadStore : ITokenPayloadStore
2626
/// <param name="payload">负载字典</param>
2727
/// <param name="expires">过期时间</param>
2828
public async Task SaveAsync(string token, IDictionary<string, string> payload, DateTime expires) =>
29-
await _cache.AddAsync(GetPayloadKey(token), payload, expires.Subtract(DateTime.UtcNow));
29+
await _cache.SetAsync(GetPayloadKey(token), payload, new CacheOptions() { Expiration = expires.Subtract(DateTime.UtcNow) });
3030

3131
/// <summary>
3232
/// 移除

0 commit comments

Comments
 (0)