diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 854bbb8..24076c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,10 +28,7 @@ jobs: - name: Setup .NET SDK uses: actions/setup-dotnet@v4.0.1 with: - dotnet-version: | - 8.0.x - 7.0.x - 6.0.x + dotnet-version: 8.0.x - name: Build run: dotnet build src --configuration Release - name: Upload packages diff --git a/src/Particular.Approvals/Approver.cs b/src/Particular.Approvals/Approver.cs index d520de8..7a92550 100644 --- a/src/Particular.Approvals/Approver.cs +++ b/src/Particular.Approvals/Approver.cs @@ -130,7 +130,7 @@ static void ThrowExceptionWithDiff(string approvedFile, string receivedFile, str var snippetDiffPoint = Enumerable.Range(0, shortestSnippetLength).FirstOrDefault(i => approvedSnippet[i] != receivedSnippet[i]); b.Append(new string('-', snippetDiffPoint + approvedStub.Length)); - b.Append("^"); + b.Append('^'); } throw new Exception(b.ToString()); @@ -140,10 +140,10 @@ static string StringRange(string source, int start, int end) { if (end >= source.Length) { - return source.Substring(start); + return source[start..]; } - return source.Substring(start, end - start); + return source[start..end]; } static string DisplaySpecialChars(string source) => source.Replace("\r", "\\r").Replace("\n", "\\n").Replace("\t", "\\t"); diff --git a/src/Particular.Approvals/Particular.Approvals.csproj b/src/Particular.Approvals/Particular.Approvals.csproj index d3c2273..fa8b37a 100644 --- a/src/Particular.Approvals/Particular.Approvals.csproj +++ b/src/Particular.Approvals/Particular.Approvals.csproj @@ -1,14 +1,13 @@  - net472;net6.0 + net8.0 true ..\NServiceBus.snk - diff --git a/src/Tests/Tests.csproj b/src/Tests/Tests.csproj index 4b5a9ff..0ae8f5e 100644 --- a/src/Tests/Tests.csproj +++ b/src/Tests/Tests.csproj @@ -1,7 +1,7 @@  - net472;net6.0;net7.0;net8.0 + net8.0 @@ -9,7 +9,7 @@ - +