diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..a5893cb4d --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,31 @@ +{ + "image": "mcr.microsoft.com/devcontainers/base:jammy", + "containerEnv": { + "DOTNET_CLI_TELEMETRY_OPTOUT": "true", + "DOTNET_NOLOGO": "true", + "DOTNET_SKIP_FIRST_TIME_EXPERIENCE": "true", + "DOTNET_USE_POLLING_FILE_WATCHER": "true", + "NUGET_XMLDOC_MODE": "skip" + }, + "features": { + "ghcr.io/devcontainers/features/git:1": {}, + "ghcr.io/devcontainers/features/git-lfs:1": {}, + "ghcr.io/devcontainers/features/docker-in-docker:2": { + "moby": true + }, + "ghcr.io/devcontainers/features/dotnet:1": { + "version": "6.0.405", + "installUsingApt": false + } + }, + "extensions": [ + "formulahendry.dotnet-test-explorer", + "ms-azuretools.vscode-docker", + "ms-dotnettools.csharp" + ], + "settings": { + "omnisharp.path": "latest" // https://github.com/OmniSharp/omnisharp-vscode/issues/5410#issuecomment-1284531542. + }, + "postCreateCommand": "git lfs pull", + "postStartCommand": "dotnet build" +} diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 51e6ea14b..fa2d7e17c 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -20,6 +20,8 @@ env: DOTNET_CLI_TELEMETRY_OPTOUT: true DOTNET_NOLOGO: true DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + DOTNET_USE_POLLING_FILE_WATCHER: true + NUGET_XMLDOC_MODE: skip TZ: CET # https://stackoverflow.com/q/53510011 jobs: diff --git a/Directory.Build.props b/Directory.Build.props index 6ec8cc151..046240c16 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,12 +2,6 @@ $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), Testcontainers.sln))/ - $(SolutionDir)build/ - $(BuildDir)obj/$(MSBuildProjectName) - $(BaseIntermediateOutputPath) - $(BaseIntermediateOutputPath) - $(BuildDir)bin/$(Platform)/$(Configuration)/$(TargetFramework) - $(OutputPath)/ $(AssemblyName) diff --git a/Packages.props b/Packages.props index 226969e46..824a2b1b9 100644 --- a/Packages.props +++ b/Packages.props @@ -7,12 +7,13 @@ - + + - + - + @@ -32,6 +33,6 @@ - + diff --git a/build.cake b/build.cake index 5b5604b87..0a60c3f41 100644 --- a/build.cake +++ b/build.cake @@ -86,7 +86,6 @@ Task("Tests") Filter = param.TestFilter, ResultsDirectory = param.Paths.Directories.TestResultsDirectoryPath, ArgumentCustomization = args => args - .Append("/p:Platform=AnyCPU") .Append("/p:CollectCoverage=true") .Append("/p:CoverletOutputFormat=\"json%2copencover\"") // https://github.com/coverlet-coverage/coverlet/pull/220#issuecomment-431507570. .Append($"/p:MergeWith=\"{MakeAbsolute(param.Paths.Directories.TestCoverageDirectoryPath)}/coverage.net6.0.json\"") @@ -142,7 +141,6 @@ Task("Create-NuGet-Packages") IncludeSymbols = true, OutputDirectory = param.Paths.Directories.NuGetDirectoryPath, ArgumentCustomization = args => args - .Append("/p:Platform=AnyCPU") .Append("/p:SymbolPackageFormat=snupkg") .Append($"/p:Version={param.Version}") }); diff --git a/examples/WeatherForecast/Directory.Build.props b/examples/WeatherForecast/Directory.Build.props index 40886a536..93a465aa6 100644 --- a/examples/WeatherForecast/Directory.Build.props +++ b/examples/WeatherForecast/Directory.Build.props @@ -2,12 +2,6 @@ $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), WeatherForecast.sln))/ - $(SolutionDir)build/ - $(BuildDir)obj/$(MSBuildProjectName) - $(BaseIntermediateOutputPath) - $(BaseIntermediateOutputPath) - $(BuildDir)bin/$(Platform)/$(Configuration)/$(TargetFramework) - $(OutputPath)/ 0.1.0 diff --git a/examples/WeatherForecast/Packages.props b/examples/WeatherForecast/Packages.props index 3658b545b..7dd8ff176 100644 --- a/examples/WeatherForecast/Packages.props +++ b/examples/WeatherForecast/Packages.props @@ -1,17 +1,17 @@ - - - - - + + + + + - - - + + + - + diff --git a/examples/WeatherForecast/src/WeatherForecast/Pages/SevenDayWeatherForecast.razor b/examples/WeatherForecast/src/WeatherForecast/Pages/SevenDayWeatherForecast.razor index ecd45c300..d4ceb7aa4 100644 --- a/examples/WeatherForecast/src/WeatherForecast/Pages/SevenDayWeatherForecast.razor +++ b/examples/WeatherForecast/src/WeatherForecast/Pages/SevenDayWeatherForecast.razor @@ -1,7 +1,9 @@ -@using WeatherForecast.Entities +@using System.Collections.Immutable +@using System.Collections.ObjectModel +@using System.Globalization +@using WeatherForecast.Entities @using WeatherForecast.Interactors @using WeatherForecast.Interactors.SearchCityOrZipCode -@using System.Globalization @implements IDisposable @inject ISearchCityOrZipCode SearchCityOrZipCode @@ -9,23 +11,15 @@

Weather Forecast

- - - - - @context.Date.ToShortDateString() - - - @context.Temperatures.Average(temperature => temperature.Value).ToString("0") - - - + + + @{ if (_weatherData.Any()) { -

The weather forecast shows the next @_weatherData.Count() days.

+

The weather forecast shows the next @_weatherData.Count days.

} else { @@ -39,13 +33,7 @@ @code { - private IEnumerable> _weatherDataColumnDefinitions = new[] - { - new ColumnDefinition("Date", _ => _), - new ColumnDefinition("Avg °C", _ => _) - }; - - private IEnumerable _weatherData = Array.Empty(); + private ImmutableList _weatherData = ImmutableList.Empty; protected override void OnInitialized() { @@ -62,7 +50,7 @@ { if (result.IsSuccessful) { - _weatherData = result.Value; + _weatherData = ImmutableList.Empty.AddRange(result.Value); } } } diff --git a/examples/WeatherForecast/tests/WeatherForecast.InProcess.Tests/WeatherForecast.InProcess.Tests.csproj b/examples/WeatherForecast/tests/WeatherForecast.InProcess.Tests/WeatherForecast.InProcess.Tests.csproj index 4a81ac8ae..f7905a324 100644 --- a/examples/WeatherForecast/tests/WeatherForecast.InProcess.Tests/WeatherForecast.InProcess.Tests.csproj +++ b/examples/WeatherForecast/tests/WeatherForecast.InProcess.Tests/WeatherForecast.InProcess.Tests.csproj @@ -11,7 +11,6 @@ - - + diff --git a/examples/WeatherForecast/tests/WeatherForecast.Tests/WeatherForecast.Tests.csproj b/examples/WeatherForecast/tests/WeatherForecast.Tests/WeatherForecast.Tests.csproj index d1405ee88..83a00bb66 100644 --- a/examples/WeatherForecast/tests/WeatherForecast.Tests/WeatherForecast.Tests.csproj +++ b/examples/WeatherForecast/tests/WeatherForecast.Tests/WeatherForecast.Tests.csproj @@ -12,7 +12,6 @@ - - + diff --git a/src/Testcontainers/Testcontainers.csproj b/src/Testcontainers/Testcontainers.csproj index abb2e8592..863c85ad1 100644 --- a/src/Testcontainers/Testcontainers.csproj +++ b/src/Testcontainers/Testcontainers.csproj @@ -3,13 +3,13 @@ netstandard2.0;netstandard2.1 Debug;Release - AnyCPU DotNet.Testcontainers + diff --git a/tests/Testcontainers.Commons/Testcontainers.Commons.csproj b/tests/Testcontainers.Commons/Testcontainers.Commons.csproj index 659ae622e..f20f75262 100644 --- a/tests/Testcontainers.Commons/Testcontainers.Commons.csproj +++ b/tests/Testcontainers.Commons/Testcontainers.Commons.csproj @@ -3,7 +3,6 @@ netstandard2.0;netstandard2.1 Debug;Release - AnyCPU DotNet.Testcontainers.Commons diff --git a/tests/Testcontainers.Platform.Linux.Tests/Testcontainers.Platform.Linux.Tests.csproj b/tests/Testcontainers.Platform.Linux.Tests/Testcontainers.Platform.Linux.Tests.csproj index 7f7bf6d95..a05fe4237 100644 --- a/tests/Testcontainers.Platform.Linux.Tests/Testcontainers.Platform.Linux.Tests.csproj +++ b/tests/Testcontainers.Platform.Linux.Tests/Testcontainers.Platform.Linux.Tests.csproj @@ -5,7 +5,6 @@ false false Debug;Release - AnyCPU @@ -14,7 +13,6 @@ - diff --git a/tests/Testcontainers.Platform.Windows.Tests/Testcontainers.Platform.Windows.Tests.csproj b/tests/Testcontainers.Platform.Windows.Tests/Testcontainers.Platform.Windows.Tests.csproj index 7f7bf6d95..a05fe4237 100644 --- a/tests/Testcontainers.Platform.Windows.Tests/Testcontainers.Platform.Windows.Tests.csproj +++ b/tests/Testcontainers.Platform.Windows.Tests/Testcontainers.Platform.Windows.Tests.csproj @@ -5,7 +5,6 @@ false false Debug;Release - AnyCPU @@ -14,7 +13,6 @@ - diff --git a/tests/Testcontainers.ResourceReaper.Tests/Testcontainers.ResourceReaper.Tests.csproj b/tests/Testcontainers.ResourceReaper.Tests/Testcontainers.ResourceReaper.Tests.csproj index 3f5a9eeef..86dca3c52 100644 --- a/tests/Testcontainers.ResourceReaper.Tests/Testcontainers.ResourceReaper.Tests.csproj +++ b/tests/Testcontainers.ResourceReaper.Tests/Testcontainers.ResourceReaper.Tests.csproj @@ -5,7 +5,6 @@ false false Debug;Release - AnyCPU DotNet.Testcontainers.ResourceReaper.Tests @@ -15,7 +14,6 @@ - diff --git a/tests/Testcontainers.Tests/Testcontainers.Tests.csproj b/tests/Testcontainers.Tests/Testcontainers.Tests.csproj index 0f61fee94..e82d1c1fb 100644 --- a/tests/Testcontainers.Tests/Testcontainers.Tests.csproj +++ b/tests/Testcontainers.Tests/Testcontainers.Tests.csproj @@ -5,7 +5,6 @@ false false Debug;Release - AnyCPU DotNet.Testcontainers.Tests @@ -32,7 +31,6 @@ -