Skip to content

Commit cf6bce3

Browse files
authored
Merge pull request #18 from dmako/devel
v 0.11
2 parents d07c28a + 300795b commit cf6bce3

42 files changed

Lines changed: 2588 additions & 1346 deletions

Some content is hidden

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

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
build_version_base:
77
description: 'Build version number X.Y.Z'
88
required: false
9-
default: 0.10.0
9+
default: 0.11.0
1010

1111
jobs:
1212

@@ -27,17 +27,17 @@ jobs:
2727
steps:
2828

2929
- name: Checkout
30-
uses: actions/checkout@v4
30+
uses: actions/checkout@v6
3131
with:
3232
fetch-depth: 0
3333

3434
- name: Setup NuGet
3535
uses: NuGet/setup-nuget@v2
3636

3737
- name: Install .NET
38-
uses: actions/setup-dotnet@v4
38+
uses: actions/setup-dotnet@v5
3939
with:
40-
dotnet-version: 9.0.x
40+
dotnet-version: 10.0.x
4141

4242
# Create the NuGet packages in the folder from the environment variable NuGetDirectory
4343
- name: Build NuGet packages

.github/workflows/verify.yml

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,27 @@ jobs:
1616
linux-build:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v6
2020
with:
2121
fetch-depth: 0
2222
- name: Setup .NET
23-
uses: actions/setup-dotnet@v4
23+
uses: actions/setup-dotnet@v5
2424
with:
25-
dotnet-version: '9.0.x'
25+
dotnet-version: '10.0.x'
2626
- name: Set up JDK 17
27-
uses: actions/setup-java@v4
27+
uses: actions/setup-java@v5
2828
with:
2929
java-version: 17
3030
distribution: 'zulu'
3131
- name: Cache SonarCloud packages
32-
uses: actions/cache@v4
32+
uses: actions/cache@v5
3333
with:
3434
path: ~/sonar/cache
3535
key: ${{ runner.os }}-sonar
3636
restore-keys: ${{ runner.os }}-sonar
3737
- name: Cache SonarCloud scanner
3838
id: cache-sonar-scanner
39-
uses: actions/cache@v4
39+
uses: actions/cache@v5
4040
with:
4141
path: ./.sonar/scanner
4242
key: ${{ runner.os }}-sonar-scanner
@@ -54,44 +54,39 @@ jobs:
5454
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5555
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
5656
shell: pwsh
57-
run: ./.sonar/scanner/dotnet-sonarscanner begin /k:"dmako_CommonNetExtensions" /o:"dmako-github" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="coverage/**/coverage.opencover.xml"
57+
run: ./.sonar/scanner/dotnet-sonarscanner begin /k:"dmako_CommonNetExtensions" /o:"dmako-github" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.scanner.scanAll=false /d:sonar.cs.vscoveragexml.reportsPaths="coverage/*.xml"
5858
- name: Build Tests
5959
run: dotnet build --configuration Release --no-restore CommonNet.Extensions.Tests/CommonNet.Extensions.Tests.csproj
6060
- name: Tests
61-
run: dotnet test --no-restore --configuration Release --no-build --verbosity normal -p:CollectCoverage=true --collect:"XPlat Code Coverage;Format=cobertura,opencover" --results-directory ./coverage CommonNet.Extensions.Tests/CommonNet.Extensions.Tests.csproj
61+
shell: pwsh
62+
run: |
63+
$currentDirectory = Get-Location
64+
dotnet test --no-restore --configuration Release --no-build --verbosity normal --framework net8.0 --results-directory $currentDirectory/coverage --coverage-output=$currentDirectory/coverage/CommonNet.Extensions.Tests.net8.0.xml --coverage-output-format=xml --coverage --project CommonNet.Extensions.Tests/CommonNet.Extensions.Tests.csproj
65+
dotnet test --no-restore --configuration Release --no-build --verbosity normal --framework net10.0 --results-directory $currentDirectory/coverage --coverage-output=$currentDirectory/coverage/CommonNet.Extensions.Tests.net10.0.xml --coverage-output-format=xml --coverage --project CommonNet.Extensions.Tests/CommonNet.Extensions.Tests.csproj
6266
- name: SonarCloud End
6367
env:
6468
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6569
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
6670
shell: pwsh
6771
run: ./.sonar/scanner/dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
68-
- name: Upload coverage reports to Codecov
69-
uses: codecov/codecov-action@v4
70-
with:
71-
token: ${{ secrets.CODECOV_TOKEN }}
72-
working-directory: coverage
73-
flags: unittests
74-
os: linux
7572
windows-build:
7673
runs-on: windows-latest
7774
steps:
78-
- uses: actions/checkout@v4
75+
- uses: actions/checkout@v6
7976
with:
8077
fetch-depth: 0
8178
- name: Setup .NET
82-
uses: actions/setup-dotnet@v4
79+
uses: actions/setup-dotnet@v5
8380
with:
84-
dotnet-version: '9.0.x'
81+
dotnet-version: '10.0.x'
8582
- name: Install dependencies
8683
run: dotnet restore CommonNet.Extensions.Tests/CommonNet.Extensions.Tests.csproj
8784
- name: Build Tests
8885
run: dotnet build --configuration Release --no-restore CommonNet.Extensions.Tests/CommonNet.Extensions.Tests.csproj
8986
- name: Tests
90-
run: dotnet test --no-restore --configuration Release --no-build --verbosity normal -p:CollectCoverage=true --collect:"XPlat Code Coverage;Format=cobertura" --results-directory ./coverage CommonNet.Extensions.Tests/CommonNet.Extensions.Tests.csproj
91-
- name: Upload coverage reports to Codecov
92-
uses: codecov/codecov-action@v4
93-
with:
94-
token: ${{ secrets.CODECOV_TOKEN }}
95-
working-directory: coverage
96-
flags: unittests
97-
os: windows
87+
shell: pwsh
88+
run: |
89+
$currentDirectory = Get-Location
90+
dotnet test --no-restore --configuration Release --no-build --verbosity normal --framework net48 --results-directory $currentDirectory/coverage --coverage-output=$currentDirectory/coverage/CommonNet.Extensions.Tests.net48.xml --coverage-output-format=xml --coverage --project CommonNet.Extensions.Tests/CommonNet.Extensions.Tests.csproj
91+
dotnet test --no-restore --configuration Release --no-build --verbosity normal --framework net8.0 --results-directory $currentDirectory/coverage --coverage-output=$currentDirectory/coverage/CommonNet.Extensions.Tests.net8.0.xml --coverage-output-format=xml --coverage --project CommonNet.Extensions.Tests/CommonNet.Extensions.Tests.csproj
92+
dotnet test --no-restore --configuration Release --no-build --verbosity normal --framework net10.0 --results-directory $currentDirectory/coverage --coverage-output=$currentDirectory/coverage/CommonNet.Extensions.Tests.net10.0.xml --coverage-output-format=xml --coverage --project CommonNet.Extensions.Tests/CommonNet.Extensions.Tests.csproj

CommonNet.Extensions.Tests/Arbs.cs

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
namespace CommonNet.Extensions.Tests;
2+
3+
public class TextBlockFormatter : ArgumentDisplayFormatter
4+
{
5+
public override bool CanHandle(object? value)
6+
{
7+
return value is string[];
8+
}
9+
10+
public override string FormatValue(object? value)
11+
{
12+
if (value is string[] textArray)
13+
{
14+
return $"\"{string.Join(Environment.NewLine, textArray)}\"";
15+
}
16+
return "Invalid input type";
17+
}
18+
}
19+
20+
public class EnumerableFormatter : ArgumentDisplayFormatter
21+
{
22+
public override bool CanHandle(object? value)
23+
{
24+
return value is System.Collections.IEnumerable;
25+
}
26+
27+
public override string FormatValue(object? value)
28+
{
29+
if (value is System.Collections.IEnumerable enumerable)
30+
{
31+
return $"[{string.Join(",", enumerable.Cast<object>().Select(o => o?.ToString() ?? "null"))}]";
32+
}
33+
return "Invalid input type";
34+
}
35+
}

CommonNet.Extensions.Tests/CastedStringKeyDictionary.cs

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

0 commit comments

Comments
 (0)