Skip to content

Commit

Permalink
Merge pull request #37 from d-velop/dotnet8
Browse files Browse the repository at this point in the history
Upgrade .NET 8
  • Loading branch information
ckuetbach authored Sep 17, 2024
2 parents eb76b0b + a41567c commit f446632
Show file tree
Hide file tree
Showing 29 changed files with 357 additions and 238 deletions.
7 changes: 6 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
<Company>d.velop AG</Company>
<Copyright>Copyright (c) 2024</Copyright>
<PackageProjectUrl>https://github.com/d-velop/dvelop-sdk-cs</PackageProjectUrl>
<VersionPrefix>0.0.10</VersionPrefix>
<VersionPrefix>0.1.0</VersionPrefix>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<None Include="$(SolutionDir)/README.md" Pack="true" PackagePath="/" />
</ItemGroup>
</Project>
7 changes: 4 additions & 3 deletions dvelop-sdk-all/DvelopSdk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<PackageId>Dvelop.Sdk</PackageId>

<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>Dvelop.Sdk</AssemblyName>
<RootNamespace>Dvelop.Sdk</RootNamespace>
<Copyright>Copyright (c) 2019</Copyright>
Expand All @@ -12,7 +12,7 @@
<IsPackable>true</IsPackable>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<PackageProjectUrl></PackageProjectUrl>
<PackageProjectUrl>https://github.com/d-velop/dvelop-sdk-cs</PackageProjectUrl>

<RepositoryUrl>https://github.com/d-velop/dvelop-sdk-cs</RepositoryUrl>

Expand All @@ -21,10 +21,11 @@
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<LangVersion>latestmajor</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>


Expand Down
5 changes: 3 additions & 2 deletions dvelop-sdk-base/BaseDtos/BaseDtos.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>Dvelop.Sdk.Base.Dto</AssemblyName>
<RootNamespace>Dvelop.Sdk.Base.Dto</RootNamespace>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<LangVersion>latestmajor</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>


Expand Down
3 changes: 2 additions & 1 deletion dvelop-sdk-base/BaseInterfaces/BaseInterfaces.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Dvelop.Sdk.BaseInterfaces</RootNamespace>
<AssemblyName>Dvelop.Sdk.BaseInterfaces</AssemblyName>
<LangVersion>latestmajor</LangVersion>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<LangVersion>latestmajor</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>


Expand Down
7 changes: 4 additions & 3 deletions dvelop-sdk-config/ConfigDtos/ConfigDtos.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>Dvelop.Sdk.Config.Dto</AssemblyName>
<RootNamespace>Dvelop.Sdk.Config.Dto</RootNamespace>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<LangVersion>latestmajor</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.1.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>


Expand Down
7 changes: 4 additions & 3 deletions dvelop-sdk-dash/DashboardDtos/DashboardDtos.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>Dvelop.Sdk.Dashboard.Dto</AssemblyName>
<RootNamespace>Dvelop.Sdk.Dashboard.Dto</RootNamespace>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>

</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>


Expand Down
23 changes: 12 additions & 11 deletions dvelop-sdk-home/HomeDtos/HomeDtos.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Dvelop.Sdk.Home.Dto</AssemblyName>
<RootNamespace>Dvelop.Sdk.Home.Dto</RootNamespace>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>Dvelop.Sdk.Home.Dto</AssemblyName>
<RootNamespace>Dvelop.Sdk.Home.Dto</RootNamespace>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<LangVersion>latestmajor</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
</ItemGroup>


</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.8" />
<PackageReference Include="coverlet.collector" Version="3.1.0">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.0" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.0" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>true</IsPackable>
<RootNamespace>Dvelop.Sdk.HttpClientExtensions</RootNamespace>
<AssemblyName>Dvelop.Sdk.HttpClientExtensions</AssemblyName>
<OutputType>Library</OutputType>

<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<LangVersion>latestmajor</LangVersion>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\dvelop-sdk-base\BaseInterfaces\BaseInterfaces.csproj" />
<ProjectReference Include="..\..\dvelop-sdk-logging\Logging.Abstractions\Logging.Abstractions.csproj" />
<ProjectReference Include="..\..\dvelop-sdk-signing\SigningAlgorithms\SigningAlgorithms.csproj" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\dvelop-sdk-base\BaseInterfaces\BaseInterfaces.csproj"/>
<ProjectReference Include="..\..\dvelop-sdk-logging\Logging.Abstractions\Logging.Abstractions.csproj"/>
<ProjectReference Include="..\..\dvelop-sdk-signing\SigningAlgorithms\SigningAlgorithms.csproj"/>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>Dvelop.Sdk.IdentityProvider.Client</AssemblyName>
<RootNamespace>Dvelop.Sdk.IdentityProvider.Client</RootNamespace>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<LangVersion>latestmajor</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>


<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Dvelop.Sdk.IdentityProvider.Client
{
public class IdentityProviderSessionStore
{
private readonly ISystemClock _clock;
private readonly TimeProvider _clock;
private readonly int _cleanupThreshold;

private readonly ConcurrentDictionary<string, IdentityProviderSessionItem> _sessionCache =
Expand All @@ -17,13 +17,13 @@ public class IdentityProviderSessionStore
private int _cleanupCounter;
private readonly object _cleanupLock=new object();

public IdentityProviderSessionStore(ISystemClock clock, int cleanupThreshold)
public IdentityProviderSessionStore(TimeProvider clock, int cleanupThreshold)
{
_clock = clock;
_cleanupThreshold = cleanupThreshold;
}

public IdentityProviderSessionStore():this(new SystemClock(), 20)
public IdentityProviderSessionStore():this(TimeProvider.System, 20)
{

}
Expand All @@ -34,7 +34,7 @@ public ClaimsPrincipal GetPrincipal(string cookie)
//CleanUp();
var id = IdFromCookie(cookie);
if (!_sessionCache.TryGetValue(id, out var sessionItem)) return null;
if (sessionItem.Expire.CompareTo(_clock.UtcNow) < 0)
if (sessionItem.Expire.CompareTo(_clock.GetUtcNow()) < 0)
{
_sessionCache.TryRemove(id,out _);
return null;
Expand Down Expand Up @@ -68,7 +68,7 @@ private void CleanUp()
foreach (var key in _sessionCache.Keys)
{
if (!_sessionCache.TryGetValue(key, out var sessionItem)) continue;
if (sessionItem.Expire.CompareTo(_clock.UtcNow) < 0)
if (sessionItem.Expire.CompareTo(_clock.GetUtcNow()) < 0)
{
_sessionCache.TryRemove(key, out _);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
<AssemblyName>Dvelop.Sdk.IdentityProviderMiddleware.UnitTest</AssemblyName>
<RootNamespace>Dvelop.Sdk.IdentityProviderMiddleware.UnitTest</RootNamespace>
<OutputType>Library</OutputType>
<LangVersion>latestmajor</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="4.19.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.8" />
<PackageReference Include="FluentAssertions" Version="6.12.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.0" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit f446632

Please sign in to comment.