From 87ee86bd570f8509ac48ebed19f995e5071a62b4 Mon Sep 17 00:00:00 2001 From: Paul Welter Date: Sat, 7 Sep 2024 11:09:44 -0500 Subject: [PATCH] update to roslyn 4.4.0 --- .github/dependabot.yml | 2 ++ .github/workflows/merge.yml | 1 - FluentCommand.sln | 3 ++- src/Directory.Build.props | 4 +-- .../FluentCommand.Generators.csproj | 12 +++++---- .../FluentCommand.SqlServer.csproj | 2 +- src/FluentCommand/FluentCommand.csproj | 2 +- src/FluentCommand/Internal/HashCode.cs | 25 ++++++++++++++++++- test/Directory.Build.props | 4 +-- test/FluentCommand.Entities/StatusRecord.cs | 14 +++++++++++ .../FluentCommand.Generators.Tests.csproj | 4 +-- .../FluentCommand.Performance.csproj | 4 --- .../FluentCommand.PostgreSQL.Tests.csproj | 4 +-- .../FluentCommand.SQLite.Tests.csproj | 2 +- .../FluentCommand.SqlServer.Tests.csproj | 10 ++++---- .../FluentCommand.Tests.csproj | 4 +-- 16 files changed, 66 insertions(+), 31 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index fa8c583b..242a072a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -15,6 +15,8 @@ updates: time: "02:00" timezone: "America/Chicago" open-pull-requests-limit: 10 + ignore: + - dependency-name: "Microsoft.CodeAnalysis.CSharp" groups: Azure: patterns: diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 491b8fca..c52640d1 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -18,7 +18,6 @@ jobs: github-token: "${{ secrets.GITHUB_TOKEN }}" - name: Dependabot Auto-Merge PRs - if: steps.metadata.outputs.update-type == 'version-update:semver-patch' run: gh pr merge --auto --merge "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} diff --git a/FluentCommand.sln b/FluentCommand.sln index aff3a4bb..81be3140 100644 --- a/FluentCommand.sln +++ b/FluentCommand.sln @@ -1,6 +1,6 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 +# 17 VisualStudioVersion = 17.3.32804.467 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentCommand", "src\FluentCommand\FluentCommand.csproj", "{4D5F125D-8DD5-496B-959E-78F55D8BE946}" @@ -22,6 +22,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{38D98603 .github\dependabot.yml = .github\dependabot.yml src\Directory.Build.props = src\Directory.Build.props .github\workflows\dotnet.yml = .github\workflows\dotnet.yml + .github\workflows\merge.yml = .github\workflows\merge.yml README.md = README.md EndProjectSection EndProject diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 05782a0f..726d45ab 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -38,8 +38,8 @@ - - + + diff --git a/src/FluentCommand.Generators/FluentCommand.Generators.csproj b/src/FluentCommand.Generators/FluentCommand.Generators.csproj index 69ef9510..4ba26bbf 100644 --- a/src/FluentCommand.Generators/FluentCommand.Generators.csproj +++ b/src/FluentCommand.Generators/FluentCommand.Generators.csproj @@ -2,22 +2,24 @@ netstandard2.0 - true - false + true + true true false true false + cs - 4.3 - latest + 4.4 + true - + + diff --git a/src/FluentCommand.SqlServer/FluentCommand.SqlServer.csproj b/src/FluentCommand.SqlServer/FluentCommand.SqlServer.csproj index dd1dadc9..a4631d84 100644 --- a/src/FluentCommand.SqlServer/FluentCommand.SqlServer.csproj +++ b/src/FluentCommand.SqlServer/FluentCommand.SqlServer.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/FluentCommand/FluentCommand.csproj b/src/FluentCommand/FluentCommand.csproj index b48f5483..6ffca903 100644 --- a/src/FluentCommand/FluentCommand.csproj +++ b/src/FluentCommand/FluentCommand.csproj @@ -18,7 +18,7 @@ - + diff --git a/src/FluentCommand/Internal/HashCode.cs b/src/FluentCommand/Internal/HashCode.cs index 19955742..35e4d639 100644 --- a/src/FluentCommand/Internal/HashCode.cs +++ b/src/FluentCommand/Internal/HashCode.cs @@ -43,7 +43,7 @@ public HashCode Combine(TValue value) var hashCode = value is null ? 0 : EqualityComparer.Default.GetHashCode(value); unchecked { - hashCode = _hashCode * Multiplier + hashCode; + hashCode = (_hashCode * Multiplier) + hashCode; } return new HashCode(hashCode); @@ -235,3 +235,26 @@ public static int HashString(string text) return hash; } } + + +public class MyClass +{ + public string Name { get; set; } + + public Type Type { get; set; } + + public override bool Equals(object obj) + { + return obj is MyClass @class && + Name == @class.Name && + EqualityComparer.Default.Equals(Type, @class.Type); + } + + public override int GetHashCode() + { + int hashCode = -243844509; + hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(Name); + hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(Type); + return hashCode; + } +} diff --git a/test/Directory.Build.props b/test/Directory.Build.props index ec0d2f97..d077344c 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -30,10 +30,8 @@ - - + - diff --git a/test/FluentCommand.Entities/StatusRecord.cs b/test/FluentCommand.Entities/StatusRecord.cs index e8dcc7f2..37392320 100644 --- a/test/FluentCommand.Entities/StatusRecord.cs +++ b/test/FluentCommand.Entities/StatusRecord.cs @@ -19,3 +19,17 @@ public record StatusRecord( [DataFieldConverter(typeof(ConcurrencyTokenHandler))] ConcurrencyToken RowVersion ); + +public record StatusRecordList( + int Id, + string Name, + string Description, + int DisplayOrder, + bool IsActive, + DateTimeOffset Created, + string CreatedBy, + DateTimeOffset Updated, + string UpdatedBy, + ConcurrencyToken RowVersion, + List Versions +); diff --git a/test/FluentCommand.Generators.Tests/FluentCommand.Generators.Tests.csproj b/test/FluentCommand.Generators.Tests/FluentCommand.Generators.Tests.csproj index d4afe5ec..94008721 100644 --- a/test/FluentCommand.Generators.Tests/FluentCommand.Generators.Tests.csproj +++ b/test/FluentCommand.Generators.Tests/FluentCommand.Generators.Tests.csproj @@ -20,8 +20,8 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/test/FluentCommand.Performance/FluentCommand.Performance.csproj b/test/FluentCommand.Performance/FluentCommand.Performance.csproj index 022229d1..b66f3402 100644 --- a/test/FluentCommand.Performance/FluentCommand.Performance.csproj +++ b/test/FluentCommand.Performance/FluentCommand.Performance.csproj @@ -26,8 +26,4 @@ - - - - diff --git a/test/FluentCommand.PostgreSQL.Tests/FluentCommand.PostgreSQL.Tests.csproj b/test/FluentCommand.PostgreSQL.Tests/FluentCommand.PostgreSQL.Tests.csproj index 3b7598ee..79a51d8c 100644 --- a/test/FluentCommand.PostgreSQL.Tests/FluentCommand.PostgreSQL.Tests.csproj +++ b/test/FluentCommand.PostgreSQL.Tests/FluentCommand.PostgreSQL.Tests.csproj @@ -30,8 +30,8 @@ - - + + all runtime; build; native; contentfiles; analyzers diff --git a/test/FluentCommand.SQLite.Tests/FluentCommand.SQLite.Tests.csproj b/test/FluentCommand.SQLite.Tests/FluentCommand.SQLite.Tests.csproj index e6da8876..22043c6b 100644 --- a/test/FluentCommand.SQLite.Tests/FluentCommand.SQLite.Tests.csproj +++ b/test/FluentCommand.SQLite.Tests/FluentCommand.SQLite.Tests.csproj @@ -30,7 +30,7 @@ - + all runtime; build; native; contentfiles; analyzers diff --git a/test/FluentCommand.SqlServer.Tests/FluentCommand.SqlServer.Tests.csproj b/test/FluentCommand.SqlServer.Tests/FluentCommand.SqlServer.Tests.csproj index 66ae3f04..36c5a6fa 100644 --- a/test/FluentCommand.SqlServer.Tests/FluentCommand.SqlServer.Tests.csproj +++ b/test/FluentCommand.SqlServer.Tests/FluentCommand.SqlServer.Tests.csproj @@ -34,11 +34,11 @@ - - - - - + + + + + all runtime; build; native; contentfiles; analyzers diff --git a/test/FluentCommand.Tests/FluentCommand.Tests.csproj b/test/FluentCommand.Tests/FluentCommand.Tests.csproj index cdf715e0..3ad611f6 100644 --- a/test/FluentCommand.Tests/FluentCommand.Tests.csproj +++ b/test/FluentCommand.Tests/FluentCommand.Tests.csproj @@ -19,8 +19,8 @@ - - + + all runtime; build; native; contentfiles; analyzers