Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -397,3 +397,7 @@ FodyWeavers.xsd
# JetBrains Rider
*.sln.iml
.idea

# agents
.claude/
CLAUDE.md
75 changes: 0 additions & 75 deletions AspNetCore.DataProtection.CustomStorage.sln

This file was deleted.

20 changes: 20 additions & 0 deletions AspNetCore.DataProtection.CustomStorage.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Solution>
<Folder Name="/src/">
<File Path="src\Directory.Build.props" />
<File Path="src\Directory.Build.targets" />
<Project Path="src\AspNetCore.DataProtection.CustomStorage\AspNetCore.DataProtection.CustomStorage.csproj" />
<Project Path="src\AspNetCore.DataProtection.CustomStorage.Dapper\AspNetCore.DataProtection.CustomStorage.Dapper.csproj" />
<Project Path="src\AspNetCore.DataProtection.CustomStorage.Dapper.SQLServer\AspNetCore.DataProtection.CustomStorage.Dapper.SQLServer.csproj" />
<Project Path="src\AspNetCore.DataProtection.CustomStorage.Dapper.PostgreSQL\AspNetCore.DataProtection.CustomStorage.Dapper.PostgreSQL.csproj" />
</Folder>
<Folder Name="/SolutionItems/">
<File Path="LICENSE" />
<File Path="NuGet.Config" />
<File Path="README.md" />
</Folder>
<Folder Name="/Tests/">
<File Path="tests\Directory.Build.props" />
<File Path="tests\Directory.Build.targets" />
<Project Path="tests\AspNetCore.DataProtection.CustomStorage.Tests\AspNetCore.DataProtection.CustomStorage.Tests.csproj" />
</Folder>
</Solution>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Description>Support for storing AspNetCore data protection keys using Dapper in PostgreSQL.</Description>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Npgsql" Version="8.0.5" />
<PackageReference Include="Npgsql" Version="10.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Description>Support for storing AspNetCore data protection keys using Dapper in SQLServer.</Description>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.2" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AspNetCore.DataProtection.CustomStorage.Dapper\AspNetCore.DataProtection.CustomStorage.Dapper.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapper" Version="2.1.35" />
<PackageReference Include="Dapper" Version="2.1.72" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="10.0.5" />
</ItemGroup>

</Project>
11 changes: 6 additions & 5 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project>
<PropertyGroup Label="Package Versions">
<VersionPrefixDataProtection>1.0</VersionPrefixDataProtection>
<VersionPrefixDataProtectionDapper>1.0</VersionPrefixDataProtectionDapper>
<VersionPrefixDataProtectionDapperPostgreSQL>1.0</VersionPrefixDataProtectionDapperPostgreSQL>
<VersionPrefixDataProtectionDapperSQLServer>1.0</VersionPrefixDataProtectionDapperSQLServer>
<VersionPrefixDataProtection>1.1</VersionPrefixDataProtection>
<VersionPrefixDataProtectionDapper>1.1</VersionPrefixDataProtectionDapper>
<VersionPrefixDataProtectionDapperPostgreSQL>1.1</VersionPrefixDataProtectionDapperPostgreSQL>
<VersionPrefixDataProtectionDapperSQLServer>1.1</VersionPrefixDataProtectionDapperSQLServer>
</PropertyGroup>
<PropertyGroup>
<VersionPrefix Condition=" '$(VersionPrefix)' == '' ">0.1</VersionPrefix>

<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>latest</LangVersion>
<ImplicitUsings>disable</ImplicitUsings>
<TreatWarningsAsErrors Condition=" '$(Configuration)' == 'Release' ">true</TreatWarningsAsErrors>
Expand Down Expand Up @@ -41,6 +41,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Security.Cryptography.Xml" Version="10.0.6" />
<InternalsVisibleTo Include="AspNetCore.DataProtection.CustomStorage.Tests" />
<None Condition="Exists('$(ProjectDir)README.md')==false" Include="..\..\README.md" Pack="true" PackagePath="\"/>
</ItemGroup>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@

</ItemGroup>

<ItemGroup>
<PackageReference Update="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Respawn" Version="6.2.1" />
<PackageReference Include="Testcontainers.PostgreSql" Version="4.0.0" />
<PackageReference Include="Testcontainers.MsSql" Version="4.0.0" />
<PackageReference Update="NSubstitute" Version="5.3.0" />
<PackageReference Update="FluentAssertions" Version="6.12.2" />
<PackageReference Include="Respawn" Version="7.0.0" />
<PackageReference Include="Testcontainers.PostgreSql" Version="4.11.0" />
<PackageReference Include="Testcontainers.MsSql" Version="4.11.0" />
</ItemGroup>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ namespace AspNetCore.DataProtection.CustomStorage.Tests.PostgreSQL;

public class PostgreSqlContainerFixture : IAsyncLifetime
{
private readonly PostgreSqlContainer _dbContainer = new PostgreSqlBuilder()
.WithImage("postgres:16.4")
private readonly PostgreSqlContainer _dbContainer = new PostgreSqlBuilder("postgres:16.4")
.WithWaitStrategy(Wait.ForUnixContainer())
.Build();

Expand All @@ -34,7 +33,7 @@ public PostgreSqlContainerFixture()
});
}

public async Task InitializeAsync()
public async ValueTask InitializeAsync()
{
await _dbContainer.StartAsync();

Expand Down Expand Up @@ -75,7 +74,7 @@ public async Task ResetDatabaseAsync()
await _respawner.ResetAsync(dbConnection);
}

public async Task DisposeAsync()
public async ValueTask DisposeAsync()
{
await NpgsqlDataSource.DisposeAsync();
await _dbContainer.StopAsync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
namespace AspNetCore.DataProtection.CustomStorage.Tests.SQLServer;
public class SqlServerContainerFixture : IAsyncLifetime
{
private readonly MsSqlContainer _dbContainer = new MsSqlBuilder()
.WithImage("mcr.microsoft.com/mssql/server:2022-latest")
private readonly MsSqlContainer _dbContainer = new MsSqlBuilder("mcr.microsoft.com/mssql/server:2022-latest")
.WithPassword(Guid.NewGuid().ToString())
.WithExposedPort(1433).WithPortBinding(1433, true)
.Build();
Expand All @@ -35,7 +34,7 @@ public SqlServerContainerFixture()
});
}

public async Task InitializeAsync()
public async ValueTask InitializeAsync()
{
await _dbContainer.StartAsync();

Expand All @@ -46,7 +45,10 @@ public async Task InitializeAsync()
InitialCatalog = initialCatalog,
};

SqlConnectionFactory = new SqlConnectionFactory(connectionStringBuilder.ConnectionString);
SqlConnectionFactory = new SqlConnectionFactory(connectionStringBuilder.ConnectionString
//quick hack for just my configuration (docker on wsl2)
.Replace("localhost", "127.0.0.1")
);

SeedDatabase();
await using var dbConnection = SqlConnectionFactory.CreateConnection();
Expand All @@ -73,7 +75,7 @@ public async Task ResetDatabaseAsync()
await _respawner.ResetAsync(dbConnection);
}

public async Task DisposeAsync()
public async ValueTask DisposeAsync()
{
await _dbContainer.StopAsync();
await _dbContainer.DisposeAsync();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json"
}
23 changes: 16 additions & 7 deletions tests/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
<Project>
<PropertyGroup>
<TargetFrameworks>net8.0;</TargetFrameworks>
<OutputType>Exe</OutputType>
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
<TestingPlatformShowTestsFailure>true</TestingPlatformShowTestsFailure>
</PropertyGroup>
<ItemGroup>
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<PropertyGroup>
<TargetFrameworks>net10.0;</TargetFrameworks>
<LangVersion>latest</LangVersion>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand All @@ -9,12 +18,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Bogus" Version="35.6.1" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="FluentAssertions" Version="6.12.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PackageReference Include="Bogus" Version="35.6.5" />
<PackageReference Include="NSubstitute" Version="5.3.0" />
<PackageReference Include="FluentAssertions" Version="8.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.4.0" />
<PackageReference Include="xunit.v3" Version="3.2.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Loading