From 1b27c9905c45de45d57546c52663304570d7a2ad Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Fri, 22 Feb 2019 19:09:08 -0800 Subject: [PATCH] Update dependencies and react to changes (#7844) * Add workaround for dotnet/sdk#2976 * Add new restore sources * Update BAR manifest to point to https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json * Obsolete WithCulture * Add retries to dockerbuild.sh * Ensure each test run gets a unique in-memory database --- .azure/pipelines/ci.yml | 2 - build/Maestro/Maestro.csproj | 2 +- build/sources.props | 3 + dockerbuild.sh | 16 + eng/Version.Details.xml | 374 +++++++++--------- eng/Versions.props | 188 ++++----- eng/Workarounds.targets | 5 + .../test/DbContextHealthCheckTest.cs | 5 +- src/Mvc/Mvc.Localization/src/HtmlLocalizer.cs | 5 +- .../Mvc.Localization/src/HtmlLocalizerOfT.cs | 5 +- .../Mvc.Localization/src/IHtmlLocalizer.cs | 4 +- src/Mvc/Mvc.Localization/src/ViewLocalizer.cs | 6 +- .../test/HtmlLocalizerTest.cs | 2 + ...lizationServiceCollectionExtensionsTest.cs | 2 + .../test/TestStringLocalizer.cs | 2 + .../test/ViewLocalizerTest.cs | 3 + 16 files changed, 335 insertions(+), 289 deletions(-) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 6c1d448e81..f7cd050b7f 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -9,8 +9,6 @@ trigger: include: - master - release/* - - internal/release/* - - ci/* # Run PR validation on all branches pr: diff --git a/build/Maestro/Maestro.csproj b/build/Maestro/Maestro.csproj index a114661e63..67a5210bc4 100644 --- a/build/Maestro/Maestro.csproj +++ b/build/Maestro/Maestro.csproj @@ -29,7 +29,7 @@ Artifacts="@(PackageToPublish)" OutputPath="$(ManifestsPath)aspnetcore-$(TargetRuntimeIdentifier)-$(PackageVersion).xml" BuildId="$(PackageVersion)" - BuildData="Location=https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json" + BuildData="Location=https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json" RepoUri="$(RepositoryUrl)" RepoBranch="$(BUILD_SOURCEBRANCH)" RepoCommit="$(BUILD_SOURCEVERSION)" /> diff --git a/build/sources.props b/build/sources.props index e32fdfb649..717242fc60 100644 --- a/build/sources.props +++ b/build/sources.props @@ -10,6 +10,9 @@ $(RestoreSources); + https://dotnetfeed.blob.core.windows.net/aspnet-extensions/index.json; + https://dotnetfeed.blob.core.windows.net/aspnet-entityframeworkcore/index.json; + https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore-tooling/index.json; https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json; https://api.nuget.org/v3/index.json; https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json; diff --git a/dockerbuild.sh b/dockerbuild.sh index 9bbab769be..9d5d6ace11 100755 --- a/dockerbuild.sh +++ b/dockerbuild.sh @@ -104,6 +104,22 @@ fi dockerfile="$DIR/build/docker/$image.Dockerfile" tagname="aspnetcore-build-$image" +# Use docker pull with retries to pre-pull the image need by the dockerfile +# docker build regularly fails with TLS handshake issues for unclear reasons. +base_imagename="$(grep -E -o 'FROM (.*)' $dockerfile | cut -c 6-)" +pull_retries=3 +while [ $pull_retries -gt 0 ]; do + failed=false + docker pull $base_imagename || failed=true + if [ "$failed" = true ]; then + let pull_retries=pull_retries-1 + echo -e "${YELLOW}Failed to pull $base_imagename Retries left: $pull_retries.${RESET}" + sleep 1 + else + pull_retries=0 + fi +done + docker build "$(dirname "$dockerfile")" \ --build-arg "USER=$(whoami)" \ --build-arg "USER_ID=$(id -u)" \ diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0c58a8e17a..74091dcf1b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,4 +1,4 @@ - + - + https://github.com/aspnet/AspNetCore-Tooling - 182b2c81a5a3c2d5219cf20205e49dbe86823e18 + b4570871aa86bbaf5c826306134ed2b837d8f3b2 - + https://github.com/aspnet/AspNetCore-Tooling - 182b2c81a5a3c2d5219cf20205e49dbe86823e18 + b4570871aa86bbaf5c826306134ed2b837d8f3b2 - + https://github.com/aspnet/AspNetCore-Tooling - 182b2c81a5a3c2d5219cf20205e49dbe86823e18 + b4570871aa86bbaf5c826306134ed2b837d8f3b2 - + https://github.com/aspnet/AspNetCore-Tooling - 182b2c81a5a3c2d5219cf20205e49dbe86823e18 + b4570871aa86bbaf5c826306134ed2b837d8f3b2 - + https://github.com/aspnet/EntityFrameworkCore - df4350283ae7ff0c67e08af16c0f00fdbd5e22ac + 542529a022a2260ba94e60bd40fbe319850b8887 - + https://github.com/aspnet/EntityFrameworkCore - df4350283ae7ff0c67e08af16c0f00fdbd5e22ac + 542529a022a2260ba94e60bd40fbe319850b8887 - + https://github.com/aspnet/EntityFrameworkCore - df4350283ae7ff0c67e08af16c0f00fdbd5e22ac + 542529a022a2260ba94e60bd40fbe319850b8887 - + https://github.com/aspnet/EntityFrameworkCore - df4350283ae7ff0c67e08af16c0f00fdbd5e22ac + 542529a022a2260ba94e60bd40fbe319850b8887 - + https://github.com/aspnet/EntityFrameworkCore - df4350283ae7ff0c67e08af16c0f00fdbd5e22ac + 542529a022a2260ba94e60bd40fbe319850b8887 - + https://github.com/aspnet/EntityFrameworkCore - df4350283ae7ff0c67e08af16c0f00fdbd5e22ac + 542529a022a2260ba94e60bd40fbe319850b8887 - + https://github.com/aspnet/EntityFrameworkCore - df4350283ae7ff0c67e08af16c0f00fdbd5e22ac + 542529a022a2260ba94e60bd40fbe319850b8887 - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/dotnet/corefx - 0abec4390b30fdda97dc496594f9b1f9c9b20e17 + b07bc5efcad439d5157f65df176e08f26ccb4b88 - + https://github.com/dotnet/corefx - 0abec4390b30fdda97dc496594f9b1f9c9b20e17 + b07bc5efcad439d5157f65df176e08f26ccb4b88 - + https://github.com/dotnet/corefx - 0abec4390b30fdda97dc496594f9b1f9c9b20e17 + b07bc5efcad439d5157f65df176e08f26ccb4b88 - + https://github.com/dotnet/corefx - 0abec4390b30fdda97dc496594f9b1f9c9b20e17 + b07bc5efcad439d5157f65df176e08f26ccb4b88 - + https://github.com/dotnet/corefx - 0abec4390b30fdda97dc496594f9b1f9c9b20e17 + b07bc5efcad439d5157f65df176e08f26ccb4b88 - + https://github.com/dotnet/corefx - 0abec4390b30fdda97dc496594f9b1f9c9b20e17 + b07bc5efcad439d5157f65df176e08f26ccb4b88 - + https://github.com/dotnet/corefx - 0abec4390b30fdda97dc496594f9b1f9c9b20e17 + b07bc5efcad439d5157f65df176e08f26ccb4b88 - + https://github.com/dotnet/corefx - 0abec4390b30fdda97dc496594f9b1f9c9b20e17 + b07bc5efcad439d5157f65df176e08f26ccb4b88 - + https://github.com/dotnet/corefx - 0abec4390b30fdda97dc496594f9b1f9c9b20e17 + b07bc5efcad439d5157f65df176e08f26ccb4b88 - + https://github.com/dotnet/corefx - 0abec4390b30fdda97dc496594f9b1f9c9b20e17 + b07bc5efcad439d5157f65df176e08f26ccb4b88 - + https://github.com/dotnet/corefx - 0abec4390b30fdda97dc496594f9b1f9c9b20e17 + b07bc5efcad439d5157f65df176e08f26ccb4b88 - + https://github.com/dotnet/corefx - 0abec4390b30fdda97dc496594f9b1f9c9b20e17 + b07bc5efcad439d5157f65df176e08f26ccb4b88 - + https://github.com/dotnet/corefx - 0abec4390b30fdda97dc496594f9b1f9c9b20e17 + b07bc5efcad439d5157f65df176e08f26ccb4b88 - + https://github.com/dotnet/corefx - 0abec4390b30fdda97dc496594f9b1f9c9b20e17 + b07bc5efcad439d5157f65df176e08f26ccb4b88 - + https://github.com/dotnet/corefx - 0abec4390b30fdda97dc496594f9b1f9c9b20e17 + b07bc5efcad439d5157f65df176e08f26ccb4b88 - + https://github.com/dotnet/corefx - 0abec4390b30fdda97dc496594f9b1f9c9b20e17 + b07bc5efcad439d5157f65df176e08f26ccb4b88 - + https://github.com/dotnet/corefx - 0abec4390b30fdda97dc496594f9b1f9c9b20e17 + b07bc5efcad439d5157f65df176e08f26ccb4b88 - + https://github.com/dotnet/corefx - 0abec4390b30fdda97dc496594f9b1f9c9b20e17 + b07bc5efcad439d5157f65df176e08f26ccb4b88 - + https://github.com/dotnet/corefx - 0abec4390b30fdda97dc496594f9b1f9c9b20e17 + b07bc5efcad439d5157f65df176e08f26ccb4b88 - + https://github.com/dotnet/core-setup - 2c740c0ea828ceac8b333dff566d117ad600a248 + 84174943d9ea6cf34ade0dbab8e7f0319378f0ab - + https://github.com/dotnet/core-setup - 2c740c0ea828ceac8b333dff566d117ad600a248 + 84174943d9ea6cf34ade0dbab8e7f0319378f0ab - + https://github.com/dotnet/core-setup - 2c740c0ea828ceac8b333dff566d117ad600a248 + 84174943d9ea6cf34ade0dbab8e7f0319378f0ab - + https://github.com/dotnet/corefx - 0abec4390b30fdda97dc496594f9b1f9c9b20e17 + b07bc5efcad439d5157f65df176e08f26ccb4b88 - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f - + https://github.com/aspnet/Extensions - 321f30556d63ec8af6eb0bc43d534b6b2e5458a0 + 924015e98bc443023a6b0eea2c0016b876e4051f diff --git a/eng/Versions.props b/eng/Versions.props index ac9bc81423..5a0236cb92 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -1,4 +1,4 @@ - + - 3.0.0-preview3-27414-8 - 3.0.0-preview3-27414-8 - 3.0.0-preview3-27414-8 + 3.0.0-preview3-27419-3 + 3.0.0-preview3-27419-3 + 3.0.0-preview3-27419-3 - 4.6.0-preview.19109.6 - 4.6.0-preview.19109.6 - 4.6.0-preview.19109.6 - 4.6.0-preview.19109.6 - 4.7.0-preview.19109.6 - 4.6.0-preview.19109.6 - 4.6.0-preview.19109.6 - 4.6.0-preview.19109.6 - 4.6.0-preview.19109.6 - 1.7.0-preview.19109.6 - 4.6.0-preview.19109.6 - 4.6.0-preview.19109.6 - 4.6.0-preview.19109.6 - 4.6.0-preview.19109.6 - 4.6.0-preview.19109.6 - 4.6.0-preview.19109.6 - 4.6.0-preview.19109.6 - 4.6.0-preview.19109.6 - 4.6.0-preview.19109.6 + 4.6.0-preview3.19115.9 + 4.6.0-preview3.19115.9 + 4.6.0-preview3.19115.9 + 4.6.0-preview3.19115.9 + 4.7.0-preview3.19115.9 + 4.6.0-preview3.19115.9 + 4.6.0-preview3.19115.9 + 4.6.0-preview3.19115.9 + 4.6.0-preview3.19115.9 + 1.7.0-preview3.19115.9 + 4.6.0-preview3.19115.9 + 4.6.0-preview3.19115.9 + 4.6.0-preview3.19115.9 + 4.6.0-preview3.19115.9 + 4.6.0-preview3.19115.9 + 4.6.0-preview3.19115.9 + 4.6.0-preview3.19115.9 + 4.6.0-preview3.19115.9 + 4.6.0-preview3.19115.9 - 3.0.0-preview.19109.6 + 3.0.0-preview3.19115.9 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 - 3.0.0-preview3.19115.4 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 + 3.0.0-preview3.19120.3 - 3.0.0-preview.19080.1 - 3.0.0-preview.19080.1 - 3.0.0-preview.19080.1 - 3.0.0-preview.19080.1 - 3.0.0-preview.19080.1 - 3.0.0-preview.19080.1 - 3.0.0-preview.19080.1 + 3.0.0-preview3.19122.12 + 3.0.0-preview3.19122.12 + 3.0.0-preview3.19122.12 + 3.0.0-preview3.19122.12 + 3.0.0-preview3.19122.12 + 3.0.0-preview3.19122.12 + 3.0.0-preview3.19122.12 - 3.0.0-preview3.19119.5 - 3.0.0-preview3.19119.5 - 3.0.0-preview3.19119.5 - 3.0.0-preview3.19119.5 + 3.0.0-preview3.19122.5 + 3.0.0-preview3.19122.5 + 3.0.0-preview3.19122.5 + 3.0.0-preview3.19122.5 + + + + > testQuery = null, HealthStatus failureStatus = HealthStatus.Unhealthy) { var serviceCollection = new ServiceCollection(); - serviceCollection.AddDbContext(o => o.UseInMemoryDatabase("Test")); + serviceCollection.AddDbContext(o => o.UseInMemoryDatabase("Test" + Interlocked.Increment(ref _testDbCounter))); var builder = serviceCollection.AddHealthChecks(); builder.AddDbContextCheck("test", failureStatus, new[] { "tag1", "tag2", }, testQuery); diff --git a/src/Mvc/Mvc.Localization/src/HtmlLocalizer.cs b/src/Mvc/Mvc.Localization/src/HtmlLocalizer.cs index 9ef531438f..1287f7f8c4 100644 --- a/src/Mvc/Mvc.Localization/src/HtmlLocalizer.cs +++ b/src/Mvc/Mvc.Localization/src/HtmlLocalizer.cs @@ -85,6 +85,7 @@ namespace Microsoft.AspNetCore.Mvc.Localization _localizer.GetAllStrings(includeParentCultures); /// + [Obsolete("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] public virtual IHtmlLocalizer WithCulture(CultureInfo culture) { if (culture == null) @@ -92,7 +93,9 @@ namespace Microsoft.AspNetCore.Mvc.Localization throw new ArgumentNullException(nameof(culture)); } +#pragma warning disable CS0618 // Type or member is obsolete return new HtmlLocalizer(_localizer.WithCulture(culture)); +#pragma warning restore CS0618 // Type or member is obsolete } /// @@ -105,4 +108,4 @@ namespace Microsoft.AspNetCore.Mvc.Localization protected virtual LocalizedHtmlString ToHtmlString(LocalizedString result, object[] arguments) => new LocalizedHtmlString(result.Name, result.Value, result.ResourceNotFound, arguments); } -} \ No newline at end of file +} diff --git a/src/Mvc/Mvc.Localization/src/HtmlLocalizerOfT.cs b/src/Mvc/Mvc.Localization/src/HtmlLocalizerOfT.cs index cea9a40a1c..736a1af6af 100644 --- a/src/Mvc/Mvc.Localization/src/HtmlLocalizerOfT.cs +++ b/src/Mvc/Mvc.Localization/src/HtmlLocalizerOfT.cs @@ -81,6 +81,7 @@ namespace Microsoft.AspNetCore.Mvc.Localization _localizer.GetAllStrings(includeParentCultures); /// + [Obsolete("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] public virtual IHtmlLocalizer WithCulture(CultureInfo culture) { if (culture == null) @@ -88,7 +89,9 @@ namespace Microsoft.AspNetCore.Mvc.Localization throw new ArgumentNullException(nameof(culture)); } +#pragma warning disable CS0618 // Type or member is obsolete return _localizer.WithCulture(culture); +#pragma warning restore CS0618 // Type or member is obsolete } } -} \ No newline at end of file +} diff --git a/src/Mvc/Mvc.Localization/src/IHtmlLocalizer.cs b/src/Mvc/Mvc.Localization/src/IHtmlLocalizer.cs index f9589a990c..0b41530fc5 100644 --- a/src/Mvc/Mvc.Localization/src/IHtmlLocalizer.cs +++ b/src/Mvc/Mvc.Localization/src/IHtmlLocalizer.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System; using System.Collections.Generic; using System.Globalization; using Microsoft.Extensions.Localization; @@ -58,6 +59,7 @@ namespace Microsoft.AspNetCore.Mvc.Localization /// /// The to use. /// A culture-specific . + [Obsolete("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] IHtmlLocalizer WithCulture(CultureInfo culture); } -} \ No newline at end of file +} diff --git a/src/Mvc/Mvc.Localization/src/ViewLocalizer.cs b/src/Mvc/Mvc.Localization/src/ViewLocalizer.cs index f8e86c4c38..72a47f5551 100644 --- a/src/Mvc/Mvc.Localization/src/ViewLocalizer.cs +++ b/src/Mvc/Mvc.Localization/src/ViewLocalizer.cs @@ -80,7 +80,11 @@ namespace Microsoft.AspNetCore.Mvc.Localization public LocalizedString GetString(string name, params object[] values) => _localizer.GetString(name, values); /// + [Obsolete("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] + +#pragma warning disable CS0618 // Type or member is obsolete public IHtmlLocalizer WithCulture(CultureInfo culture) => _localizer.WithCulture(culture); +#pragma warning restore CS0618 // Type or member is obsolete /// public IEnumerable GetAllStrings(bool includeParentCultures) => @@ -127,4 +131,4 @@ namespace Microsoft.AspNetCore.Mvc.Localization return builder.ToString(); } } -} \ No newline at end of file +} diff --git a/src/Mvc/Mvc.Localization/test/HtmlLocalizerTest.cs b/src/Mvc/Mvc.Localization/test/HtmlLocalizerTest.cs index d7cf25b528..6a6a4ba6a4 100644 --- a/src/Mvc/Mvc.Localization/test/HtmlLocalizerTest.cs +++ b/src/Mvc/Mvc.Localization/test/HtmlLocalizerTest.cs @@ -212,7 +212,9 @@ namespace Microsoft.AspNetCore.Mvc.Localization.Test var htmlLocalizer = new HtmlLocalizer(stringLocalizer); // Act +#pragma warning disable CS0618 // Type or member is obsolete var actualLocalizedHtmlString = htmlLocalizer.WithCulture(new CultureInfo("fr"))["John"]; +#pragma warning restore CS0618 // Type or member is obsolete // Assert Assert.Equal("Bonjour John", actualLocalizedHtmlString.Value); diff --git a/src/Mvc/Mvc.Localization/test/MvcLocalizationServiceCollectionExtensionsTest.cs b/src/Mvc/Mvc.Localization/test/MvcLocalizationServiceCollectionExtensionsTest.cs index f67e5f466d..1308e9790e 100644 --- a/src/Mvc/Mvc.Localization/test/MvcLocalizationServiceCollectionExtensionsTest.cs +++ b/src/Mvc/Mvc.Localization/test/MvcLocalizationServiceCollectionExtensionsTest.cs @@ -99,6 +99,7 @@ namespace Microsoft.AspNetCore.Mvc.Localization throw new NotImplementedException(); } + [Obsolete("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] public IHtmlLocalizer WithCulture(CultureInfo culture) { throw new NotImplementedException(); @@ -127,6 +128,7 @@ namespace Microsoft.AspNetCore.Mvc.Localization throw new NotImplementedException(); } + [Obsolete("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] public IHtmlLocalizer WithCulture(CultureInfo culture) { throw new NotImplementedException(); diff --git a/src/Mvc/Mvc.Localization/test/TestStringLocalizer.cs b/src/Mvc/Mvc.Localization/test/TestStringLocalizer.cs index a2268d47c9..adb4b7ff64 100644 --- a/src/Mvc/Mvc.Localization/test/TestStringLocalizer.cs +++ b/src/Mvc/Mvc.Localization/test/TestStringLocalizer.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System; using System.Collections.Generic; using System.Globalization; using Microsoft.Extensions.Localization; @@ -67,6 +68,7 @@ namespace Microsoft.AspNetCore.Mvc.Localization.Test return allStrings; } + [Obsolete("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] public IStringLocalizer WithCulture(CultureInfo culture) { return new TestStringLocalizer(culture); diff --git a/src/Mvc/Mvc.Localization/test/ViewLocalizerTest.cs b/src/Mvc/Mvc.Localization/test/ViewLocalizerTest.cs index 991abf81db..529dfbd744 100644 --- a/src/Mvc/Mvc.Localization/test/ViewLocalizerTest.cs +++ b/src/Mvc/Mvc.Localization/test/ViewLocalizerTest.cs @@ -280,7 +280,9 @@ namespace Microsoft.AspNetCore.Mvc.Localization.Test viewLocalizer.Contextualize(viewContext); // Act +#pragma warning disable CS0618 // Type or member is obsolete var actualLocalizedString = viewLocalizer.WithCulture(new CultureInfo("fr"))["John"]; +#pragma warning restore CS0618 // Type or member is obsolete // Assert Assert.Equal("Bonjour John", actualLocalizedString.Value); @@ -325,6 +327,7 @@ namespace Microsoft.AspNetCore.Mvc.Localization.Test return _stringLocalizer.GetAllStrings(includeParentCultures); } + [Obsolete("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] public IHtmlLocalizer WithCulture(CultureInfo culture) { return new TestHtmlLocalizer(new TestStringLocalizer(culture));