From 042c833145b6bd15ae67820cdfac2990eff0d469 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Fri, 29 Jun 2018 09:41:41 -0700 Subject: [PATCH 01/41] Razor runtime compilation produces errors if running on a shared runtime that's rolled forward Do not provide compilation references from runtime MVC assemblies. This avoids cases where the app is compiled against an older MVC but running against a newer one (e.g. shared fx roll forward) resulting in compiling against multiple versions of MVC assemblies Fixes #7969 --- .../MvcServiceCollectionExtensions.cs | 23 +++++++++++++++---- .../Controllers/HomeController.cs | 2 +- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/Microsoft.AspNetCore.Mvc/MvcServiceCollectionExtensions.cs b/src/Microsoft.AspNetCore.Mvc/MvcServiceCollectionExtensions.cs index b7baee8634..037bcdd2d3 100644 --- a/src/Microsoft.AspNetCore.Mvc/MvcServiceCollectionExtensions.cs +++ b/src/Microsoft.AspNetCore.Mvc/MvcServiceCollectionExtensions.cs @@ -2,6 +2,8 @@ // 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.Diagnostics; using System.Linq; using System.Reflection; using Microsoft.AspNetCore.Mvc; @@ -59,15 +61,15 @@ namespace Microsoft.Extensions.DependencyInjection private static void AddDefaultFrameworkParts(ApplicationPartManager partManager) { var mvcTagHelpersAssembly = typeof(InputTagHelper).GetTypeInfo().Assembly; - if(!partManager.ApplicationParts.OfType().Any(p => p.Assembly == mvcTagHelpersAssembly)) + if (!partManager.ApplicationParts.OfType().Any(p => p.Assembly == mvcTagHelpersAssembly)) { - partManager.ApplicationParts.Add(new AssemblyPart(mvcTagHelpersAssembly)); + partManager.ApplicationParts.Add(new FrameworkAssemblyPart(mvcTagHelpersAssembly)); } - + var mvcRazorAssembly = typeof(UrlResolutionTagHelper).GetTypeInfo().Assembly; - if(!partManager.ApplicationParts.OfType().Any(p => p.Assembly == mvcRazorAssembly)) + if (!partManager.ApplicationParts.OfType().Any(p => p.Assembly == mvcRazorAssembly)) { - partManager.ApplicationParts.Add(new AssemblyPart(mvcRazorAssembly)); + partManager.ApplicationParts.Add(new FrameworkAssemblyPart(mvcRazorAssembly)); } } @@ -94,5 +96,16 @@ namespace Microsoft.Extensions.DependencyInjection return builder; } + + [DebuggerDisplay("{Name}")] + private class FrameworkAssemblyPart : AssemblyPart, ICompilationReferencesProvider + { + public FrameworkAssemblyPart(Assembly assembly) + : base(assembly) + { + } + + IEnumerable ICompilationReferencesProvider.GetReferencePaths() => Enumerable.Empty(); + } } } diff --git a/test/WebSites/BasicWebSite/Controllers/HomeController.cs b/test/WebSites/BasicWebSite/Controllers/HomeController.cs index 454aca34b8..5d5fb11525 100644 --- a/test/WebSites/BasicWebSite/Controllers/HomeController.cs +++ b/test/WebSites/BasicWebSite/Controllers/HomeController.cs @@ -129,7 +129,7 @@ namespace BasicWebSite.Controllers // Ensures that the entry assembly part is marked correctly. var assemblyPartMetadata = applicationPartManager .ApplicationParts - .Where(part => part.GetType() == typeof(AssemblyPart)) + .OfType() .Select(part => part.Name) .ToArray(); From ac4d6366b70b4adb3b18e07084c3eb4c01bf1161 Mon Sep 17 00:00:00 2001 From: Nathanael Marchand Date: Tue, 5 Jun 2018 14:24:42 +0200 Subject: [PATCH 02/41] Fix Api Explorer not returning type with ActionResult and no type in ProducesResponseTypeAttribute --- .../ApiResponseTypeProvider.cs | 13 +- .../ApiResponseTypeProviderTest.cs | 6 +- .../DefaultApiDescriptionProviderTest.cs | 210 ++++++++++++++++++ .../ApiExplorerTest.cs | 10 +- 4 files changed, 233 insertions(+), 6 deletions(-) diff --git a/src/Microsoft.AspNetCore.Mvc.ApiExplorer/ApiResponseTypeProvider.cs b/src/Microsoft.AspNetCore.Mvc.ApiExplorer/ApiResponseTypeProvider.cs index e0953ca6e2..d6c7cd7661 100644 --- a/src/Microsoft.AspNetCore.Mvc.ApiExplorer/ApiResponseTypeProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.ApiExplorer/ApiResponseTypeProvider.cs @@ -86,13 +86,24 @@ namespace Microsoft.AspNetCore.Mvc.ApiExplorer { metadataAttribute.SetContentTypes(contentTypes); - if (metadataAttribute.Type != null) + if (metadataAttribute.Type == typeof(void) && + type != null && + (metadataAttribute.StatusCode == StatusCodes.Status200OK || metadataAttribute.StatusCode == StatusCodes.Status201Created)) + { + // ProducesResponseTypeAttribute's constructor defaults to setting "Type" to void when no value is specified. + // In this event, use the action's return type for 200 or 201 status codes. This lets you decorate an action with a + // [ProducesResponseType(201)] instead of [ProducesResponseType(201, typeof(Person)] when typeof(Person) can be inferred + // from the return type. + objectTypes[metadataAttribute.StatusCode] = type; + } + else if (metadataAttribute.Type != null) { objectTypes[metadataAttribute.StatusCode] = metadataAttribute.Type; } } } + // Set the default status only when no status has already been set explicitly if (objectTypes.Count == 0 && type != null) { diff --git a/test/Microsoft.AspNetCore.Mvc.ApiExplorer.Test/ApiResponseTypeProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.ApiExplorer.Test/ApiResponseTypeProviderTest.cs index 99e862dcf4..7f3247deac 100644 --- a/test/Microsoft.AspNetCore.Mvc.ApiExplorer.Test/ApiResponseTypeProviderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.ApiExplorer.Test/ApiResponseTypeProviderTest.cs @@ -98,9 +98,11 @@ namespace Microsoft.AspNetCore.Mvc.ApiExplorer responseType => { Assert.Equal(200, responseType.StatusCode); - Assert.Equal(typeof(void), responseType.Type); + Assert.Equal(typeof(BaseModel), responseType.Type); Assert.False(responseType.IsDefaultResponse); - Assert.Empty(responseType.ApiResponseFormats); + Assert.Collection( + responseType.ApiResponseFormats, + format => Assert.Equal("application/json", format.MediaType)); }, responseType => { diff --git a/test/Microsoft.AspNetCore.Mvc.ApiExplorer.Test/DefaultApiDescriptionProviderTest.cs b/test/Microsoft.AspNetCore.Mvc.ApiExplorer.Test/DefaultApiDescriptionProviderTest.cs index b661be6034..5caceeaa02 100644 --- a/test/Microsoft.AspNetCore.Mvc.ApiExplorer.Test/DefaultApiDescriptionProviderTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.ApiExplorer.Test/DefaultApiDescriptionProviderTest.cs @@ -665,6 +665,216 @@ namespace Microsoft.AspNetCore.Mvc.Description }); } + [Theory] + [InlineData(nameof(ReturnsActionResultOfProduct))] + [InlineData(nameof(ReturnsTaskOfActionResultOfProduct))] + public void GetApiDescription_ReturnsActionResultOfTWithProducesContentType( + string methodName) + { + // Arrange + var action = CreateActionDescriptor(methodName); + action.FilterDescriptors = new List() + { + // Since action is returning Void or Task, it does not make sense to provide a value for the + // 'Type' property to ProducesAttribute. But the same action could return other types of data + // based on runtime conditions. + new FilterDescriptor( + new ProducesAttribute("text/json", "application/json"), + FilterScope.Action), + new FilterDescriptor( + new ProducesResponseTypeAttribute(200), + FilterScope.Action), + new FilterDescriptor( + new ProducesResponseTypeAttribute(202), + FilterScope.Action), + new FilterDescriptor( + new ProducesResponseTypeAttribute(typeof(BadData), 400), + FilterScope.Action), + new FilterDescriptor( + new ProducesResponseTypeAttribute(typeof(ErrorDetails), 500), + FilterScope.Action) + }; + var expectedMediaTypes = new[] { "application/json", "text/json" }; + + // Act + var descriptions = GetApiDescriptions(action); + + // Assert + var description = Assert.Single(descriptions); + Assert.Equal(4, description.SupportedResponseTypes.Count); + + Assert.Collection( + description.SupportedResponseTypes.OrderBy(responseType => responseType.StatusCode), + responseType => + { + Assert.Equal(typeof(Product), responseType.Type); + Assert.Equal(200, responseType.StatusCode); + Assert.NotNull(responseType.ModelMetadata); + Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); + }, + responseType => + { + Assert.Equal(typeof(void), responseType.Type); + Assert.Equal(202, responseType.StatusCode); + Assert.Null(responseType.ModelMetadata); + Assert.Empty(GetSortedMediaTypes(responseType)); + }, + responseType => + { + Assert.Equal(typeof(BadData), responseType.Type); + Assert.Equal(400, responseType.StatusCode); + Assert.NotNull(responseType.ModelMetadata); + Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); + }, + responseType => + { + Assert.Equal(typeof(ErrorDetails), responseType.Type); + Assert.Equal(500, responseType.StatusCode); + Assert.NotNull(responseType.ModelMetadata); + Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); + }); + } + + [Theory] + [InlineData(nameof(ReturnsActionResultOfProduct))] + [InlineData(nameof(ReturnsTaskOfActionResultOfProduct))] + public void GetApiDescription_ReturnsActionResultOfTWithProducesContentType_ForStatusCode201( + string methodName) + { + // Arrange + var action = CreateActionDescriptor(methodName); + action.FilterDescriptors = new List() + { + // Since action is returning Void or Task, it does not make sense to provide a value for the + // 'Type' property to ProducesAttribute. But the same action could return other types of data + // based on runtime conditions. + new FilterDescriptor( + new ProducesAttribute("text/json", "application/json"), + FilterScope.Action), + new FilterDescriptor( + new ProducesResponseTypeAttribute(201), + FilterScope.Action), + new FilterDescriptor( + new ProducesResponseTypeAttribute(204), + FilterScope.Action), + new FilterDescriptor( + new ProducesResponseTypeAttribute(typeof(BadData), 400), + FilterScope.Action), + new FilterDescriptor( + new ProducesResponseTypeAttribute(typeof(ErrorDetails), 500), + FilterScope.Action) + }; + var expectedMediaTypes = new[] { "application/json", "text/json" }; + + // Act + var descriptions = GetApiDescriptions(action); + + // Assert + var description = Assert.Single(descriptions); + Assert.Equal(4, description.SupportedResponseTypes.Count); + + Assert.Collection( + description.SupportedResponseTypes.OrderBy(responseType => responseType.StatusCode), + responseType => + { + Assert.Equal(typeof(Product), responseType.Type); + Assert.Equal(201, responseType.StatusCode); + Assert.NotNull(responseType.ModelMetadata); + Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); + }, + responseType => + { + Assert.Equal(typeof(void), responseType.Type); + Assert.Equal(204, responseType.StatusCode); + Assert.Null(responseType.ModelMetadata); + Assert.Empty(GetSortedMediaTypes(responseType)); + }, + responseType => + { + Assert.Equal(typeof(BadData), responseType.Type); + Assert.Equal(400, responseType.StatusCode); + Assert.NotNull(responseType.ModelMetadata); + Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); + }, + responseType => + { + Assert.Equal(typeof(ErrorDetails), responseType.Type); + Assert.Equal(500, responseType.StatusCode); + Assert.NotNull(responseType.ModelMetadata); + Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); + }); + } + + [Theory] + [InlineData(nameof(ReturnsActionResultOfSequenceOfProducts))] + [InlineData(nameof(ReturnsTaskOfActionResultOfSequenceOfProducts))] + public void GetApiDescription_ReturnsActionResultOfSequenceOfTWithProducesContentType( + string methodName) + { + // Arrange + var action = CreateActionDescriptor(methodName); + action.FilterDescriptors = new List() + { + // Since action is returning Void or Task, it does not make sense to provide a value for the + // 'Type' property to ProducesAttribute. But the same action could return other types of data + // based on runtime conditions. + new FilterDescriptor( + new ProducesAttribute("text/json", "application/json"), + FilterScope.Action), + new FilterDescriptor( + new ProducesResponseTypeAttribute(200), + FilterScope.Action), + new FilterDescriptor( + new ProducesResponseTypeAttribute(201), + FilterScope.Action), + new FilterDescriptor( + new ProducesResponseTypeAttribute(typeof(BadData), 400), + FilterScope.Action), + new FilterDescriptor( + new ProducesResponseTypeAttribute(typeof(ErrorDetails), 500), + FilterScope.Action) + }; + var expectedMediaTypes = new[] { "application/json", "text/json" }; + + // Act + var descriptions = GetApiDescriptions(action); + + // Assert + var description = Assert.Single(descriptions); + Assert.Equal(4, description.SupportedResponseTypes.Count); + + Assert.Collection( + description.SupportedResponseTypes.OrderBy(responseType => responseType.StatusCode), + responseType => + { + Assert.Equal(typeof(IEnumerable), responseType.Type); + Assert.Equal(200, responseType.StatusCode); + Assert.NotNull(responseType.ModelMetadata); + Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); + }, + responseType => + { + Assert.Equal(typeof(IEnumerable), responseType.Type); + Assert.Equal(201, responseType.StatusCode); + Assert.NotNull(responseType.ModelMetadata); + Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); + }, + responseType => + { + Assert.Equal(typeof(BadData), responseType.Type); + Assert.Equal(400, responseType.StatusCode); + Assert.NotNull(responseType.ModelMetadata); + Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); + }, + responseType => + { + Assert.Equal(typeof(ErrorDetails), responseType.Type); + Assert.Equal(500, responseType.StatusCode); + Assert.NotNull(responseType.ModelMetadata); + Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); + }); + } + [Theory] [InlineData(nameof(ReturnsVoid))] [InlineData(nameof(ReturnsTask))] diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/ApiExplorerTest.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/ApiExplorerTest.cs index 7490fe2f7f..e575967651 100644 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/ApiExplorerTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/ApiExplorerTest.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Net; using System.Net.Http; using System.Threading.Tasks; +using ApiExplorerWebSite; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Testing.xunit; @@ -1156,6 +1157,9 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests private async Task ApiConvention_ForGetMethod(string action) { + // Arrange + var expectedMediaTypes = new[] { "application/json", "application/xml", "text/json", "text/xml" }; + // Act var response = await Client.GetStringAsync( $"ApiExplorerResponseTypeWithApiConventionController/{action}"); @@ -1168,9 +1172,9 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests description.SupportedResponseTypes.OrderBy(r => r.StatusCode), responseType => { - Assert.Equal(typeof(void).FullName, responseType.ResponseType); + Assert.Equal(typeof(Product).FullName, responseType.ResponseType); Assert.Equal(200, responseType.StatusCode); - Assert.Empty(responseType.ResponseFormats); + Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); }, responseType => { @@ -1198,7 +1202,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests description.SupportedResponseTypes.OrderBy(r => r.StatusCode), responseType => { - Assert.Equal(typeof(IEnumerable).FullName, responseType.ResponseType); + Assert.Equal(typeof(IEnumerable).FullName, responseType.ResponseType); Assert.Equal(200, responseType.StatusCode); var actualMediaTypes = responseType.ResponseFormats.Select(r => r.MediaType).OrderBy(r => r); Assert.Equal(expectedMediaTypes, actualMediaTypes); From e3d8189f983a8b560042f77ff011593d0b593726 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Thu, 28 Jun 2018 15:20:59 -0700 Subject: [PATCH 03/41] Update branding to 3.0.0-alpha1 --- version.props | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/version.props b/version.props index 86ccc772a5..541f76d159 100644 --- a/version.props +++ b/version.props @@ -1,7 +1,7 @@ - 2.2.0 - preview1 + 3.0.0 + alpha1 t000 a- @@ -10,8 +10,8 @@ $(FeatureBranchVersionPrefix)$(VersionSuffix)-$([System.Text.RegularExpressions.Regex]::Replace('$(FeatureBranchVersionSuffix)', '[^\w-]', '-')) $(VersionSuffix)-$(BuildNumber) - 0.2.0 - preview1 + 0.3.0 + alpha1 $(ExperimentalVersionPrefix) $(ExperimentalVersionPrefix)-$(ExperimentalVersionSuffix)-final From 4aed4adf83407a1613807ede5edd1d0f3950867d Mon Sep 17 00:00:00 2001 From: "Nate McMaster (automated)" Date: Mon, 2 Jul 2018 12:40:30 -0700 Subject: [PATCH 04/41] [automated] Change default branch to master --- .appveyor.yml | 2 +- .travis.yml | 2 +- .vsts-pipelines/builds/ci-internal.yml | 4 ++-- .vsts-pipelines/builds/ci-public.yml | 6 +++--- korebuild.json | 4 ++-- run.ps1 | 6 +++--- run.sh | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 711303fa0f..018881c604 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -2,7 +2,7 @@ init: - git config --global core.autocrlf true branches: only: - - dev + - master - /^release\/.*$/ - /^(.*\/)?ci-.*$/ build_script: diff --git a/.travis.yml b/.travis.yml index e75fe73221..d56301c453 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ os: osx_image: xcode8.2 branches: only: - - dev + - master - /^release\/.*$/ - /^(.*\/)?ci-.*$/ before_install: diff --git a/.vsts-pipelines/builds/ci-internal.yml b/.vsts-pipelines/builds/ci-internal.yml index d7ceb76378..c2c5336fd0 100644 --- a/.vsts-pipelines/builds/ci-internal.yml +++ b/.vsts-pipelines/builds/ci-internal.yml @@ -1,5 +1,5 @@ trigger: -- dev +- master - release/* resources: @@ -7,7 +7,7 @@ resources: - repository: buildtools type: git name: aspnet-BuildTools - ref: refs/heads/dev + ref: refs/heads/master phases: - template: .vsts-pipelines/templates/project-ci.yml@buildtools diff --git a/.vsts-pipelines/builds/ci-public.yml b/.vsts-pipelines/builds/ci-public.yml index b7f25723f8..507c89b025 100644 --- a/.vsts-pipelines/builds/ci-public.yml +++ b/.vsts-pipelines/builds/ci-public.yml @@ -1,5 +1,5 @@ trigger: -- dev +- master - release/* # See https://github.com/aspnet/BuildTools @@ -9,7 +9,7 @@ resources: type: github endpoint: DotNet-Bot GitHub Connection name: aspnet/BuildTools - ref: refs/heads/dev - + ref: refs/heads/master + phases: - template: .vsts-pipelines/templates/project-ci.yml@buildtools diff --git a/korebuild.json b/korebuild.json index bd5d51a51b..8a276a7f35 100644 --- a/korebuild.json +++ b/korebuild.json @@ -1,4 +1,4 @@ { - "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/dev/tools/korebuild.schema.json", - "channel": "dev" + "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/master/tools/korebuild.schema.json", + "channel": "master" } diff --git a/run.ps1 b/run.ps1 index 3b27382468..34604c7175 100644 --- a/run.ps1 +++ b/run.ps1 @@ -52,8 +52,8 @@ in the file are overridden by command line parameters. Example config file: ```json { - "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/dev/tools/korebuild.schema.json", - "channel": "dev", + "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/master/tools/korebuild.schema.json", + "channel": "master", "toolsSource": "https://aspnetcore.blob.core.windows.net/buildtools" } ``` @@ -192,7 +192,7 @@ if (!$DotNetHome) { else { Join-Path $PSScriptRoot '.dotnet'} } -if (!$Channel) { $Channel = 'dev' } +if (!$Channel) { $Channel = 'master' } if (!$ToolsSource) { $ToolsSource = 'https://aspnetcore.blob.core.windows.net/buildtools' } # Execute diff --git a/run.sh b/run.sh index 02aac15874..61f7a53385 100755 --- a/run.sh +++ b/run.sh @@ -248,7 +248,7 @@ if [ -f "$config_file" ]; then [ ! -z "${config_tools_source:-}" ] && tools_source="$config_tools_source" fi -[ -z "$channel" ] && channel='dev' +[ -z "$channel" ] && channel='master' [ -z "$tools_source" ] && tools_source='https://aspnetcore.blob.core.windows.net/buildtools' get_korebuild From da556a41b7b21c4f3eb83233fcfe540ed9239eb7 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Tue, 3 Jul 2018 16:21:36 +0000 Subject: [PATCH 05/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 146 +++++++++++++++++++-------------------- korebuild-lock.txt | 4 +- 2 files changed, 75 insertions(+), 75 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 3744df253b..33f4900564 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -16,87 +16,87 @@ 0.42.1 2.1.0 2.1.0-rc1-final - 2.2.0-preview1-34576 - 2.2.0-preview1-17090 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10000 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 5.2.6 2.8.0 2.8.0 - 2.2.0-preview1-34576 + 3.0.0-alpha1-10016 1.7.0 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 2.2.0-preview1-26618-02 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 2.0.0 2.1.0 2.2.0-preview1-26618-02 - 2.2.0-preview1-34576 - 2.2.0-preview1-34576 + 3.0.0-alpha1-10016 + 3.0.0-alpha1-10016 15.6.1 4.7.49 2.0.3 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index a8109db529..f0b76184fd 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-17090 -commithash:b19e903e946579cd9482089bce7d917e8bacd765 +version:3.0.0-alpha1-10000 +commithash:b7b88d08d55abc8b71de9abf16e26fc713e332cd From 432e11f2862b1c231497e57f0052bae4ca213869 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 8 Jul 2018 20:03:13 +0000 Subject: [PATCH 06/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 148 +++++++++++++++++++-------------------- korebuild-lock.txt | 4 +- 2 files changed, 76 insertions(+), 76 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 33f4900564..676b7d9077 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -16,87 +16,87 @@ 0.42.1 2.1.0 2.1.0-rc1-final - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10000 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10005 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 5.2.6 2.8.0 2.8.0 - 3.0.0-alpha1-10016 + 3.0.0-alpha1-10044 1.7.0 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 2.2.0-preview1-26618-02 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 2.0.0 2.1.0 2.2.0-preview1-26618-02 - 3.0.0-alpha1-10016 - 3.0.0-alpha1-10016 + 3.0.0-alpha1-10044 + 3.0.0-alpha1-10044 15.6.1 4.7.49 2.0.3 @@ -106,7 +106,7 @@ 4.6.0-preview1-26617-01 0.8.0 2.3.1 - 2.4.0-beta.1.build3945 + 2.4.0-rc.1.build4038 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index f0b76184fd..f357ac9f7d 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:3.0.0-alpha1-10000 -commithash:b7b88d08d55abc8b71de9abf16e26fc713e332cd +version:3.0.0-alpha1-10005 +commithash:05570853de976a526462ca140a55b1ac59d9a351 From 315497918917d3180fa870368669cc597f4e7e31 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Thu, 12 Jul 2018 14:58:57 +1200 Subject: [PATCH 07/41] Add Consumes endpoint constraint (#8053) --- .../ConsumesAttribute.cs | 97 +++++++- .../Internal/IConsumesActionConstraint.cs | 9 + .../ConsumesAttributeTests.cs | 228 ++++++++++++++++-- .../ConsumesAttributeDispatchingTests.cs | 13 + .../ConsumesAttributeTests.cs | 160 +----------- .../ConsumesAttributeTestsBase.cs | 175 ++++++++++++++ .../BasicWebSite/StartupWithDispatching.cs | 37 +++ 7 files changed, 546 insertions(+), 173 deletions(-) create mode 100644 test/Microsoft.AspNetCore.Mvc.FunctionalTests/ConsumesAttributeDispatchingTests.cs create mode 100644 test/Microsoft.AspNetCore.Mvc.FunctionalTests/ConsumesAttributeTestsBase.cs create mode 100644 test/WebSites/BasicWebSite/StartupWithDispatching.cs diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ConsumesAttribute.cs b/src/Microsoft.AspNetCore.Mvc.Core/ConsumesAttribute.cs index c3c240e63e..7d63adcabf 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ConsumesAttribute.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ConsumesAttribute.cs @@ -11,6 +11,8 @@ using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.Internal; +using Microsoft.AspNetCore.Routing; +using Microsoft.AspNetCore.Routing.EndpointConstraints; using Microsoft.Net.Http.Headers; namespace Microsoft.AspNetCore.Mvc @@ -24,7 +26,8 @@ namespace Microsoft.AspNetCore.Mvc Attribute, IResourceFilter, IConsumesActionConstraint, - IApiRequestMetadataProvider + IApiRequestMetadataProvider, + IConsumesEndpointConstraint { public static readonly int ConsumesActionConstraintOrder = 200; @@ -55,6 +58,11 @@ namespace Microsoft.AspNetCore.Mvc /// int IActionConstraint.Order => ConsumesActionConstraintOrder; + // The value used is a non default value so that it avoids getting mixed with other endpoint constraints + // with default order. + /// + int IEndpointConstraint.Order => ConsumesActionConstraintOrder; + /// /// Gets or sets the supported request content types. Used to select an action when there would otherwise be /// multiple matches. @@ -184,6 +192,83 @@ namespace Microsoft.AspNetCore.Mvc return true; } + /// + public bool Accept(EndpointConstraintContext context) + { + // If this constraint is not closest to the endpoint, it will be skipped. + if (!IsApplicable(context.CurrentCandidate.Endpoint)) + { + // Since the constraint is to be skipped, returning true here + // will let the current candidate ignore this constraint and will + // be selected based on other constraints for this endpoint. + return true; + } + + var requestContentType = context.HttpContext.Request.ContentType; + + // If the request content type is null we need to act like pass through. + // In case there is a single candidate with a constraint it should be selected. + // If there are multiple endpoints with consumes endpoint constraints this should result in ambiguous exception + // unless there is another endpoint without a consumes constraint. + if (requestContentType == null) + { + var isEndpointWithoutConsumeConstraintPresent = context.Candidates.Any( + candidate => candidate.Constraints == null || + !candidate.Constraints.Any(constraint => constraint is IConsumesEndpointConstraint)); + + return !isEndpointWithoutConsumeConstraintPresent; + } + + // Confirm the request's content type is more specific than (a media type this endpoint supports e.g. OK + // if client sent "text/plain" data and this endpoint supports "text/*". + if (IsSubsetOfAnyContentType(requestContentType)) + { + return true; + } + + var firstCandidate = context.Candidates[0]; + if (firstCandidate.Endpoint != context.CurrentCandidate.Endpoint) + { + // If the current candidate is not same as the first candidate, + // we need not probe other candidates to see if they apply. + // Only the first candidate is allowed to probe other candidates and based on the result select itself. + return false; + } + + // Run the matching logic for all IConsumesEndpointConstraints we can find, and see what matches. + // 1). If we have a unique best match, then only that constraint should return true. + // 2). If we have multiple matches, then all constraints that match will return true + // , resulting in ambiguity(maybe). + // 3). If we have no matches, then we choose the first constraint to return true.It will later return a 415 + foreach (var candidate in context.Candidates) + { + if (candidate.Endpoint == firstCandidate.Endpoint) + { + continue; + } + + var tempContext = new EndpointConstraintContext() + { + Candidates = context.Candidates, + HttpContext = context.HttpContext, + CurrentCandidate = candidate + }; + + if (candidate.Constraints == null || candidate.Constraints.Count == 0 || + candidate.Constraints.Any(constraint => constraint is IConsumesEndpointConstraint && + constraint.Accept(tempContext))) + { + // There is someone later in the chain which can handle the request. + // end the process here. + return false; + } + } + + // There is no one later in the chain that can handle this content type return a false positive so that + // later we can detect and return a 415. + return true; + } + private bool IsApplicable(ActionDescriptor actionDescriptor) { // If there are multiple IConsumeActionConstraints which are defined at the class and @@ -193,7 +278,17 @@ namespace Microsoft.AspNetCore.Mvc // closest to the action), we apply this constraint only if there is no IConsumeActionConstraint after this. return actionDescriptor.FilterDescriptors.Last( filter => filter.Filter is IConsumesActionConstraint).Filter == this; + } + private bool IsApplicable(Endpoint endpoint) + { + // If there are multiple IConsumeActionConstraints which are defined at the class and + // at the action level, the one closest to the action overrides the others. To ensure this + // we take advantage of the fact that ConsumesAttribute is both an IActionFilter and an + // IConsumeActionConstraint. Since filterdescriptor collection is ordered (the last filter is the one + // closest to the action), we apply this constraint only if there is no IConsumeActionConstraint after this. + return endpoint.Metadata.Last( + metadata => metadata is IConsumesEndpointConstraint) == this; } private MediaTypeCollection GetContentTypes(string firstArg, string[] args) diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/IConsumesActionConstraint.cs b/src/Microsoft.AspNetCore.Mvc.Core/Internal/IConsumesActionConstraint.cs index b004cbdcf3..2806bd496d 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/IConsumesActionConstraint.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Internal/IConsumesActionConstraint.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Mvc.ActionConstraints; +using Microsoft.AspNetCore.Routing.EndpointConstraints; namespace Microsoft.AspNetCore.Mvc.Internal { @@ -12,4 +13,12 @@ namespace Microsoft.AspNetCore.Mvc.Internal public interface IConsumesActionConstraint : IActionConstraint { } + + /// + /// An constraint that identifies a type which can be used to select an action + /// based on incoming request. + /// + public interface IConsumesEndpointConstraint : IEndpointConstraint + { + } } \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.Core.Test/ConsumesAttributeTests.cs b/test/Microsoft.AspNetCore.Mvc.Core.Test/ConsumesAttributeTests.cs index a2738ed9a2..83bae7b4b0 100644 --- a/test/Microsoft.AspNetCore.Mvc.Core.Test/ConsumesAttributeTests.cs +++ b/test/Microsoft.AspNetCore.Mvc.Core.Test/ConsumesAttributeTests.cs @@ -12,6 +12,8 @@ using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Routing; +using Microsoft.AspNetCore.Routing.EndpointConstraints; +using Microsoft.AspNetCore.Routing.Matchers; using Microsoft.Net.Http.Headers; using Moq; using Xunit; @@ -80,7 +82,7 @@ namespace Microsoft.AspNetCore.Mvc [InlineData("application/json")] [InlineData("application/json;Parameter1=12")] [InlineData("text/xml")] - public void Accept_MatchesForMachingRequestContentType(string contentType) + public void ActionConstraint_Accept_MatchesForMachingRequestContentType(string contentType) { // Arrange var constraint = new ConsumesAttribute("application/json", "text/xml"); @@ -104,7 +106,7 @@ namespace Microsoft.AspNetCore.Mvc } [Fact] - public void Accept_TheFirstCandidateReturnsFalse_IfALaterOneMatches() + public void ActionConstraint_Accept_TheFirstCandidateReturnsFalse_IfALaterOneMatches() { // Arrange var constraint1 = new ConsumesAttribute("application/json", "text/xml"); @@ -114,7 +116,7 @@ namespace Microsoft.AspNetCore.Mvc new List() { new FilterDescriptor(constraint1, FilterScope.Action) } }; - var constraint2 = new Mock(); + var constraint2 = new Mock(); var action2 = new ActionDescriptor() { FilterDescriptors = @@ -142,7 +144,7 @@ namespace Microsoft.AspNetCore.Mvc [InlineData("application/custom")] [InlineData("")] [InlineData(null)] - public void Accept_ForNoMatchingCandidates_SelectsTheFirstCandidate(string contentType) + public void ActionConstraint_Accept_ForNoMatchingCandidates_SelectsTheFirstCandidate(string contentType) { // Arrange var constraint1 = new ConsumesAttribute("application/json", "text/xml"); @@ -152,7 +154,7 @@ namespace Microsoft.AspNetCore.Mvc new List() { new FilterDescriptor(constraint1, FilterScope.Action) } }; - var constraint2 = new Mock(); + var constraint2 = new Mock(); var action2 = new ActionDescriptor() { FilterDescriptors = @@ -179,7 +181,7 @@ namespace Microsoft.AspNetCore.Mvc [Theory] [InlineData("")] [InlineData(null)] - public void Accept_ForNoRequestType_SelectsTheCandidateWithoutConstraintIfPresent(string contentType) + public void ActionConstraint_Accept_ForNoRequestType_SelectsTheCandidateWithoutConstraintIfPresent(string contentType) { // Arrange var constraint1 = new ConsumesAttribute("application/json"); @@ -219,7 +221,7 @@ namespace Microsoft.AspNetCore.Mvc [InlineData("application/xml")] [InlineData("application/custom")] [InlineData("invalid/invalid")] - public void Accept_UnrecognizedMediaType_SelectsTheCandidateWithoutConstraintIfPresent(string contentType) + public void ActionConstraint_Accept_UnrecognizedMediaType_SelectsTheCandidateWithoutConstraintIfPresent(string contentType) { // Arrange var actionWithoutConstraint = new ActionDescriptor(); @@ -258,7 +260,7 @@ namespace Microsoft.AspNetCore.Mvc [Theory] [InlineData("")] [InlineData(null)] - public void Accept_ForNoRequestType_ReturnsTrueForAllConstraints(string contentType) + public void ActionConstraint_Accept_ForNoRequestType_ReturnsTrueForAllConstraints(string contentType) { // Arrange var constraint1 = new ConsumesAttribute("application/json"); @@ -293,6 +295,193 @@ namespace Microsoft.AspNetCore.Mvc Assert.True(constraint2.Accept(context)); } + private MatcherEndpoint CreateEndpoint(params IEndpointConstraint[] constraints) + { + EndpointMetadataCollection endpointMetadata = new EndpointMetadataCollection(constraints); + + return new MatcherEndpoint( + (r) => null, + "", + new RouteValueDictionary(), + new RouteValueDictionary(), + 0, + endpointMetadata, + ""); + } + + [Theory] + [InlineData("application/json")] + [InlineData("application/json;Parameter1=12")] + [InlineData("text/xml")] + public void EndpointConstraint_Accept_MatchesForMachingRequestContentType(string contentType) + { + // Arrange + var constraint = new ConsumesAttribute("application/json", "text/xml"); + var endpoint = CreateEndpoint(constraint); + + var context = new EndpointConstraintContext(); + context.Candidates = new List() + { + new EndpointSelectorCandidate(endpoint, new [] { constraint }), + }; + + context.CurrentCandidate = context.Candidates[0]; + context.HttpContext = CreateHttpContext(contentType: contentType); + + // Act & Assert + Assert.True(constraint.Accept(context)); + } + + [Fact] + public void EndpointConstraint_Accept_TheFirstCandidateReturnsFalse_IfALaterOneMatches() + { + // Arrange + var constraint1 = new ConsumesAttribute("application/json", "text/xml"); + var endpoint1 = CreateEndpoint(constraint1); + + var constraint2 = new Mock(); + var endpoint2 = CreateEndpoint(constraint2.Object); + + constraint2.Setup(o => o.Accept(It.IsAny())) + .Returns(true); + + var context = new EndpointConstraintContext(); + context.Candidates = new List() + { + new EndpointSelectorCandidate(endpoint1, new [] { constraint1 }), + new EndpointSelectorCandidate(endpoint2, new [] { constraint2.Object }), + }; + + context.CurrentCandidate = context.Candidates[0]; + context.HttpContext = CreateHttpContext(contentType: "application/custom"); + + // Act & Assert + Assert.False(constraint1.Accept(context)); + } + + [Theory] + [InlineData("application/custom")] + [InlineData("")] + [InlineData(null)] + public void EndpointConstraint_Accept_ForNoMatchingCandidates_SelectsTheFirstCandidate(string contentType) + { + // Arrange + var constraint1 = new ConsumesAttribute("application/json", "text/xml"); + var endpoint1 = CreateEndpoint(constraint1); + + var constraint2 = new Mock(); + var endpoint2 = CreateEndpoint(constraint2.Object); + + constraint2.Setup(o => o.Accept(It.IsAny())) + .Returns(false); + + var context = new EndpointConstraintContext(); + context.Candidates = new List() + { + new EndpointSelectorCandidate(endpoint1, new [] { constraint1 }), + new EndpointSelectorCandidate(endpoint2, new [] { constraint2.Object }), + }; + + context.CurrentCandidate = context.Candidates[0]; + context.HttpContext = CreateHttpContext(contentType: contentType); + + // Act & Assert + Assert.True(constraint1.Accept(context)); + } + + [Theory] + [InlineData("")] + [InlineData(null)] + public void EndpointConstraint_Accept_ForNoRequestType_SelectsTheCandidateWithoutConstraintIfPresent(string contentType) + { + // Arrange + var constraint1 = new ConsumesAttribute("application/json"); + var endpointWithConstraint = CreateEndpoint(constraint1); + + var constraint2 = new ConsumesAttribute("text/xml"); + var endpointWithConstraint2 = CreateEndpoint(constraint2); + + var endpointWithoutConstraint = CreateEndpoint(); + + var context = new EndpointConstraintContext(); + context.Candidates = new List() + { + new EndpointSelectorCandidate(endpointWithConstraint, new [] { constraint1 }), + new EndpointSelectorCandidate(endpointWithConstraint2, new [] { constraint2 }), + new EndpointSelectorCandidate(endpointWithoutConstraint, new List()), + }; + + context.HttpContext = CreateHttpContext(contentType: contentType); + + // Act & Assert + context.CurrentCandidate = context.Candidates[0]; + Assert.False(constraint1.Accept(context)); + context.CurrentCandidate = context.Candidates[1]; + Assert.False(constraint2.Accept(context)); + } + + [Theory] + [InlineData("application/xml")] + [InlineData("application/custom")] + [InlineData("invalid/invalid")] + public void EndpointConstraint_Accept_UnrecognizedMediaType_SelectsTheCandidateWithoutConstraintIfPresent(string contentType) + { + // Arrange + var endpointWithoutConstraint = CreateEndpoint(); + var constraint1 = new ConsumesAttribute("application/json"); + var endpointWithConstraint = CreateEndpoint(constraint1); + + var constraint2 = new ConsumesAttribute("text/xml"); + var endpointWithConstraint2 = CreateEndpoint(constraint2); + + var context = new EndpointConstraintContext(); + context.Candidates = new List() + { + new EndpointSelectorCandidate(endpointWithConstraint, new [] { constraint1 }), + new EndpointSelectorCandidate(endpointWithConstraint2, new [] { constraint2 }), + new EndpointSelectorCandidate(endpointWithoutConstraint, new List()), + }; + + context.HttpContext = CreateHttpContext(contentType: contentType); + + // Act & Assert + context.CurrentCandidate = context.Candidates[0]; + Assert.False(constraint1.Accept(context)); + + context.CurrentCandidate = context.Candidates[1]; + Assert.False(constraint2.Accept(context)); + } + + [Theory] + [InlineData("")] + [InlineData(null)] + public void EndpointConstraint_Accept_ForNoRequestType_ReturnsTrueForAllConstraints(string contentType) + { + // Arrange + var constraint1 = new ConsumesAttribute("application/json"); + var endpointWithConstraint = CreateEndpoint(constraint1); + + var constraint2 = new ConsumesAttribute("text/xml"); + var endpointWithConstraint2 = CreateEndpoint(constraint2); + + var endpointWithoutConstraint = CreateEndpoint(); + + var context = new EndpointConstraintContext(); + context.Candidates = new List() + { + new EndpointSelectorCandidate(endpointWithConstraint, new [] { constraint1 }), + new EndpointSelectorCandidate(endpointWithConstraint2, new [] { constraint2 }), + }; + + context.HttpContext = CreateHttpContext(contentType: contentType); + + // Act & Assert + context.CurrentCandidate = context.Candidates[0]; + Assert.True(constraint1.Accept(context)); + context.CurrentCandidate = context.Candidates[1]; + Assert.True(constraint2.Accept(context)); + } + [Theory] [InlineData("application/xml")] [InlineData("application/custom")] @@ -404,11 +593,7 @@ namespace Microsoft.AspNetCore.Mvc private static RouteContext CreateRouteContext(string contentType = null, object routeValues = null) { - var httpContext = new DefaultHttpContext(); - if (contentType != null) - { - httpContext.Request.ContentType = contentType; - } + var httpContext = CreateHttpContext(contentType); var routeContext = new RouteContext(httpContext); routeContext.RouteData = new RouteData(); @@ -421,7 +606,22 @@ namespace Microsoft.AspNetCore.Mvc return routeContext; } - public interface ITestConsumeConstraint : IConsumesActionConstraint, IResourceFilter + private static HttpContext CreateHttpContext(string contentType = null, object routeValues = null) + { + var httpContext = new DefaultHttpContext(); + if (contentType != null) + { + httpContext.Request.ContentType = contentType; + } + + return httpContext; + } + + public interface ITestActionConsumeConstraint : IConsumesActionConstraint, IResourceFilter + { + } + + public interface ITestEndpointConsumeConstraint : IConsumesEndpointConstraint, IResourceFilter { } } diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/ConsumesAttributeDispatchingTests.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/ConsumesAttributeDispatchingTests.cs new file mode 100644 index 0000000000..ced707f674 --- /dev/null +++ b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/ConsumesAttributeDispatchingTests.cs @@ -0,0 +1,13 @@ +// 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. + +namespace Microsoft.AspNetCore.Mvc.FunctionalTests +{ + public class ConsumesAttributeDispatchingTests : ConsumesAttributeTestsBase + { + public ConsumesAttributeDispatchingTests(MvcTestFixture fixture) + : base(fixture) + { + } + } +} \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/ConsumesAttributeTests.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/ConsumesAttributeTests.cs index 181094b715..a8db21d806 100644 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/ConsumesAttributeTests.cs +++ b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/ConsumesAttributeTests.cs @@ -1,169 +1,13 @@ // 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.Net; -using System.Net.Http; -using System.Text; -using System.Threading.Tasks; -using BasicWebSite.Models; -using Microsoft.AspNetCore.Mvc.Infrastructure; -using Microsoft.AspNetCore.Testing.xunit; -using Newtonsoft.Json; -using Xunit; - namespace Microsoft.AspNetCore.Mvc.FunctionalTests { - public class ConsumesAttributeTests : IClassFixture> + public class ConsumesAttributeTests : ConsumesAttributeTestsBase { public ConsumesAttributeTests(MvcTestFixture fixture) + : base(fixture) { - Client = fixture.CreateDefaultClient(); - } - - public HttpClient Client { get; } - - [Fact] - public async Task NoRequestContentType_SelectsActionWithoutConstraint() - { - // Arrange - var request = new HttpRequestMessage( - HttpMethod.Post, - "http://localhost/ConsumesAttribute_Company/CreateProduct"); - - // Act - var response = await Client.SendAsync(request); - var body = await response.Content.ReadAsStringAsync(); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal("CreateProduct_Product_Text", body); - } - - [Fact] - public async Task NoRequestContentType_Selects_IfASingleActionWithConstraintIsPresent() - { - // Arrange - var request = new HttpRequestMessage( - HttpMethod.Post, - "http://localhost/ConsumesAttribute_PassThrough/CreateProduct"); - - // Act - var response = await Client.SendAsync(request); - var body = await response.Content.ReadAsStringAsync(); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal("ConsumesAttribute_PassThrough_Product_Json", body); - } - - [Theory] - [InlineData("application/json")] - [InlineData("text/json")] - public async Task Selects_Action_BasedOnRequestContentType(string requestContentType) - { - // Arrange - var input = "{SampleString:\""+requestContentType+"\"}"; - var request = new HttpRequestMessage( - HttpMethod.Post, - "http://localhost/ConsumesAttribute_AmbiguousActions/CreateProduct"); - request.Content = new StringContent(input, Encoding.UTF8, requestContentType); - - // Act - var response = await Client.SendAsync(request); - var product = JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync()); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal(requestContentType, product.SampleString); - } - - [Theory] - [InlineData("application/json")] - [InlineData("text/json")] - public async Task ActionLevelAttribute_OveridesClassLevel(string requestContentType) - { - // Arrange - var input = "{SampleString:\"" + requestContentType + "\"}"; - var request = new HttpRequestMessage( - HttpMethod.Post, - "http://localhost/ConsumesAttribute_OverridesBase/CreateProduct"); - request.Content = new StringContent(input, Encoding.UTF8, requestContentType); - var expectedString = "ConsumesAttribute_OverridesBaseController_" + requestContentType; - - // Act - var response = await Client.SendAsync(request); - var product = JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync()); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal(expectedString, product.SampleString); - } - - [ConditionalFact] - // Mono issue - https://github.com/aspnet/External/issues/18 - [FrameworkSkipCondition(RuntimeFrameworks.Mono)] - public async Task DerivedClassLevelAttribute_OveridesBaseClassLevel() - { - // Arrange - var input = "" + - "application/xml"; - var request = new HttpRequestMessage( - HttpMethod.Post, - "http://localhost/ConsumesAttribute_Overrides/CreateProduct"); - request.Content = new StringContent(input, Encoding.UTF8, "application/xml"); - var expectedString = "ConsumesAttribute_OverridesController_application/xml"; - - // Act - var response = await Client.SendAsync(request); - var responseString = await response.Content.ReadAsStringAsync(); - var product = JsonConvert.DeserializeObject(responseString); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal(expectedString, product.SampleString); - } - - [Fact] - public async Task JsonSyntaxSuffix_SelectsActionConsumingJson() - { - // Arrange - var input = "{SampleString:\"some input\"}"; - var request = new HttpRequestMessage( - HttpMethod.Post, - "http://localhost/ConsumesAttribute_MediaTypeSuffix/CreateProduct"); - request.Content = new StringContent(input, Encoding.UTF8, "application/vnd.example+json"); - - // Act - var response = await Client.SendAsync(request); - var product = JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync()); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal("Read from JSON: some input", product.SampleString); - } - - [ConditionalFact] - // Mono issue - https://github.com/aspnet/External/issues/18 - [FrameworkSkipCondition(RuntimeFrameworks.Mono)] - public async Task XmlSyntaxSuffix_SelectsActionConsumingXml() - { - // Arrange - var input = "" + - "some input"; - var request = new HttpRequestMessage( - HttpMethod.Post, - "http://localhost/ConsumesAttribute_MediaTypeSuffix/CreateProduct"); - request.Content = new StringContent(input, Encoding.UTF8, "application/vnd.example+xml"); - - // Act - var response = await Client.SendAsync(request); - var product = JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync()); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal("Read from XML: some input", product.SampleString); } } } \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/ConsumesAttributeTestsBase.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/ConsumesAttributeTestsBase.cs new file mode 100644 index 0000000000..9a414488b1 --- /dev/null +++ b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/ConsumesAttributeTestsBase.cs @@ -0,0 +1,175 @@ +// 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.Linq; +using System.Net; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; +using BasicWebSite.Models; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Mvc.Infrastructure; +using Microsoft.AspNetCore.Testing.xunit; +using Newtonsoft.Json; +using Xunit; + +namespace Microsoft.AspNetCore.Mvc.FunctionalTests +{ + public abstract class ConsumesAttributeTestsBase : IClassFixture> where TStartup : class + { + protected ConsumesAttributeTestsBase(MvcTestFixture fixture) + { + var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); + Client = factory.CreateDefaultClient(); + } + + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => + builder.UseStartup(); + + public HttpClient Client { get; } + + [Fact] + public async Task NoRequestContentType_SelectsActionWithoutConstraint() + { + // Arrange + var request = new HttpRequestMessage( + HttpMethod.Post, + "http://localhost/ConsumesAttribute_Company/CreateProduct"); + + // Act + var response = await Client.SendAsync(request); + var body = await response.Content.ReadAsStringAsync(); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Equal("CreateProduct_Product_Text", body); + } + + [Fact] + public async Task NoRequestContentType_Selects_IfASingleActionWithConstraintIsPresent() + { + // Arrange + var request = new HttpRequestMessage( + HttpMethod.Post, + "http://localhost/ConsumesAttribute_PassThrough/CreateProduct"); + + // Act + var response = await Client.SendAsync(request); + var body = await response.Content.ReadAsStringAsync(); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Equal("ConsumesAttribute_PassThrough_Product_Json", body); + } + + [Theory] + [InlineData("application/json")] + [InlineData("text/json")] + public async Task Selects_Action_BasedOnRequestContentType(string requestContentType) + { + // Arrange + var input = "{SampleString:\""+requestContentType+"\"}"; + var request = new HttpRequestMessage( + HttpMethod.Post, + "http://localhost/ConsumesAttribute_AmbiguousActions/CreateProduct"); + request.Content = new StringContent(input, Encoding.UTF8, requestContentType); + + // Act + var response = await Client.SendAsync(request); + var product = JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync()); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Equal(requestContentType, product.SampleString); + } + + [Theory] + [InlineData("application/json")] + [InlineData("text/json")] + public async Task ActionLevelAttribute_OveridesClassLevel(string requestContentType) + { + // Arrange + var input = "{SampleString:\"" + requestContentType + "\"}"; + var request = new HttpRequestMessage( + HttpMethod.Post, + "http://localhost/ConsumesAttribute_OverridesBase/CreateProduct"); + request.Content = new StringContent(input, Encoding.UTF8, requestContentType); + var expectedString = "ConsumesAttribute_OverridesBaseController_" + requestContentType; + + // Act + var response = await Client.SendAsync(request); + var product = JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync()); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Equal(expectedString, product.SampleString); + } + + [ConditionalFact] + // Mono issue - https://github.com/aspnet/External/issues/18 + [FrameworkSkipCondition(RuntimeFrameworks.Mono)] + public async Task DerivedClassLevelAttribute_OveridesBaseClassLevel() + { + // Arrange + var input = "" + + "application/xml"; + var request = new HttpRequestMessage( + HttpMethod.Post, + "http://localhost/ConsumesAttribute_Overrides/CreateProduct"); + request.Content = new StringContent(input, Encoding.UTF8, "application/xml"); + var expectedString = "ConsumesAttribute_OverridesController_application/xml"; + + // Act + var response = await Client.SendAsync(request); + var responseString = await response.Content.ReadAsStringAsync(); + var product = JsonConvert.DeserializeObject(responseString); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Equal(expectedString, product.SampleString); + } + + [Fact] + public async Task JsonSyntaxSuffix_SelectsActionConsumingJson() + { + // Arrange + var input = "{SampleString:\"some input\"}"; + var request = new HttpRequestMessage( + HttpMethod.Post, + "http://localhost/ConsumesAttribute_MediaTypeSuffix/CreateProduct"); + request.Content = new StringContent(input, Encoding.UTF8, "application/vnd.example+json"); + + // Act + var response = await Client.SendAsync(request); + var product = JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync()); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Equal("Read from JSON: some input", product.SampleString); + } + + [ConditionalFact] + // Mono issue - https://github.com/aspnet/External/issues/18 + [FrameworkSkipCondition(RuntimeFrameworks.Mono)] + public async Task XmlSyntaxSuffix_SelectsActionConsumingXml() + { + // Arrange + var input = "" + + "some input"; + var request = new HttpRequestMessage( + HttpMethod.Post, + "http://localhost/ConsumesAttribute_MediaTypeSuffix/CreateProduct"); + request.Content = new StringContent(input, Encoding.UTF8, "application/vnd.example+xml"); + + // Act + var response = await Client.SendAsync(request); + var product = JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync()); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Equal("Read from XML: some input", product.SampleString); + } + } +} \ No newline at end of file diff --git a/test/WebSites/BasicWebSite/StartupWithDispatching.cs b/test/WebSites/BasicWebSite/StartupWithDispatching.cs new file mode 100644 index 0000000000..4c5ed0dc1e --- /dev/null +++ b/test/WebSites/BasicWebSite/StartupWithDispatching.cs @@ -0,0 +1,37 @@ +// 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 Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.DependencyInjection; + +namespace BasicWebSite +{ + public class StartupWithDispatching + { + // Set up application services + public void ConfigureServices(IServiceCollection services) + { + services.AddDispatcher(); + + services.AddMvc() + .SetCompatibilityVersion(CompatibilityVersion.Latest) + .AddXmlDataContractSerializerFormatters(); + + services.ConfigureBaseWebSiteAuthPolicies(); + } + + public void Configure(IApplicationBuilder app) + { + app.UseDispatcher(); + + app.UseMvcWithEndpoint(routes => + { + routes.MapEndpoint( + "ActionAsMethod", + "{controller}/{action}", + defaults: new { controller = "Home", action = "Index" }); + }); + } + } +} \ No newline at end of file From 11a9bafeb4dd16a47d00b243175007799946d216 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 15 Jul 2018 20:06:06 +0000 Subject: [PATCH 08/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 160 +++++++++++++++++++-------------------- korebuild-lock.txt | 4 +- 2 files changed, 82 insertions(+), 82 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 676b7d9077..ef71e047e1 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -16,95 +16,95 @@ 0.42.1 2.1.0 2.1.0-rc1-final - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10005 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10009 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 5.2.6 2.8.0 2.8.0 - 3.0.0-alpha1-10044 + 3.0.0-alpha1-10081 1.7.0 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 2.2.0-preview1-26618-02 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 - 2.0.0 - 2.1.0 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-preview1-26710-03 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 + 2.0.9 + 2.1.2 2.2.0-preview1-26618-02 - 3.0.0-alpha1-10044 - 3.0.0-alpha1-10044 + 3.0.0-alpha1-10081 + 3.0.0-alpha1-10081 15.6.1 4.7.49 2.0.3 1.0.1 - 4.6.0-preview1-26617-01 - 4.6.0-preview1-26617-01 - 4.6.0-preview1-26617-01 - 0.8.0 + 4.6.0-preview1-26708-04 + 4.6.0-preview1-26708-04 + 4.6.0-preview1-26708-04 + 0.9.0 2.3.1 2.4.0-rc.1.build4038 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index f357ac9f7d..4db537685b 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:3.0.0-alpha1-10005 -commithash:05570853de976a526462ca140a55b1ac59d9a351 +version:3.0.0-alpha1-10009 +commithash:86be4707e47d2f1930a982f2b59eacfc4196da33 From 737464eafacd1f1de5a9daa2989e137cf1090f4f Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Tue, 17 Jul 2018 22:41:56 +1200 Subject: [PATCH 09/41] Merge release/2.2 --- ...crosoft.AspNetCore.Mvc.Abstractions.csproj | 9 +- .../Properties/AssemblyInfo.cs | 30 + ...icrosoft.AspNetCore.Mvc.ApiExplorer.csproj | 4 - .../ConsumesAttribute.cs | 2 +- .../Internal/ActionSelector.cs | 2 +- .../Internal/AttributeRoute.cs | 2 +- .../ControllerActionDescriptorBuilder.cs | 2 +- .../Internal/ControllerActionInvoker.cs | 2 +- .../Internal/MvcAttributeRouteHandler.cs | 2 +- .../Internal/MvcEndpointDataSource.cs | 44 +- .../Microsoft.AspNetCore.Mvc.Core.csproj | 25 +- .../Properties/AssemblyInfo.cs | 32 +- ...soft.AspNetCore.Mvc.DataAnnotations.csproj | 2 - ...osoft.AspNetCore.Mvc.Formatters.Xml.csproj | 3 - ...crosoft.AspNetCore.Mvc.Localization.csproj | 1 - .../IModelTypeProvider.cs | 9 + .../Microsoft.AspNetCore.Mvc.Razor.csproj | 4 - .../Properties/AssemblyInfo.cs | 2 + .../RazorPageActivator.cs | 65 +- .../RazorView.cs | 4 + .../MvcRazorPagesMvcBuilderExtensions.cs | 1 + .../MvcRazorPagesMvcCoreBuilderExtensions.cs | 1 + .../Infrastructure/PageResultExecutor.cs | 20 +- .../Infrastructure/RazorPageAdapter.cs | 12 +- ...Microsoft.AspNetCore.Mvc.RazorPages.csproj | 10 - ...Microsoft.AspNetCore.Mvc.TagHelpers.csproj | 2 - ...crosoft.AspNetCore.Mvc.ViewFeatures.csproj | 8 - .../Internal/TestResources.cs | 2 +- .../RazorPagesWithBasePathTest.cs | 16 + .../VersioningDispatchingTests.cs | 13 + .../VersioningTests.cs | 553 +---------------- .../VersioningTestsBase.cs | 568 ++++++++++++++++++ .../RazorPageActivatorTest.cs | 78 +++ .../RazorViewTest.cs | 43 ++ .../Rendering/TestResources.cs | 2 +- .../ViewData/ViewDataSetInViewStart/Index.cs | 11 + .../ViewDataSetInViewStart/Index.cshtml | 7 + .../ViewDataSetInViewStart/_Layout.cshtml | 4 + .../ViewDataSetInViewStart/_ViewStart.cshtml | 4 + test/WebSites/VersioningWebSite/Program.cs | 26 + test/WebSites/VersioningWebSite/Startup.cs | 18 +- .../StartupWithDispatching.cs | 37 ++ .../VersioningWebSite/VersionAttribute.cs | 10 +- .../VersionDeleteAttribute.cs | 2 +- .../VersioningWebSite/VersionGetAttribute.cs | 2 +- .../VersioningWebSite/VersionPostAttribute.cs | 2 +- .../VersioningWebSite/VersionPutAttribute.cs | 2 +- .../VersionRangeValidator.cs | 15 +- ...rsionRoute.cs => VersionRouteAttribute.cs} | 20 +- 49 files changed, 1069 insertions(+), 666 deletions(-) create mode 100644 src/Microsoft.AspNetCore.Mvc.Razor/IModelTypeProvider.cs create mode 100644 test/Microsoft.AspNetCore.Mvc.FunctionalTests/VersioningDispatchingTests.cs create mode 100644 test/Microsoft.AspNetCore.Mvc.FunctionalTests/VersioningTestsBase.cs create mode 100644 test/WebSites/RazorPagesWebSite/Pages/ViewData/ViewDataSetInViewStart/Index.cs create mode 100644 test/WebSites/RazorPagesWebSite/Pages/ViewData/ViewDataSetInViewStart/Index.cshtml create mode 100644 test/WebSites/RazorPagesWebSite/Pages/ViewData/ViewDataSetInViewStart/_Layout.cshtml create mode 100644 test/WebSites/RazorPagesWebSite/Pages/ViewData/ViewDataSetInViewStart/_ViewStart.cshtml create mode 100644 test/WebSites/VersioningWebSite/Program.cs create mode 100644 test/WebSites/VersioningWebSite/StartupWithDispatching.cs rename test/WebSites/VersioningWebSite/{VersionRoute.cs => VersionRouteAttribute.cs} (84%) diff --git a/src/Microsoft.AspNetCore.Mvc.Abstractions/Microsoft.AspNetCore.Mvc.Abstractions.csproj b/src/Microsoft.AspNetCore.Mvc.Abstractions/Microsoft.AspNetCore.Mvc.Abstractions.csproj index 4ebbaeec61..bea1675a90 100644 --- a/src/Microsoft.AspNetCore.Mvc.Abstractions/Microsoft.AspNetCore.Mvc.Abstractions.csproj +++ b/src/Microsoft.AspNetCore.Mvc.Abstractions/Microsoft.AspNetCore.Mvc.Abstractions.csproj @@ -12,11 +12,12 @@ Microsoft.AspNetCore.Mvc.IActionResult - - - - + + + + + diff --git a/src/Microsoft.AspNetCore.Mvc.Abstractions/Properties/AssemblyInfo.cs b/src/Microsoft.AspNetCore.Mvc.Abstractions/Properties/AssemblyInfo.cs index 3af3e8d9b2..f28aa5fed6 100644 --- a/src/Microsoft.AspNetCore.Mvc.Abstractions/Properties/AssemblyInfo.cs +++ b/src/Microsoft.AspNetCore.Mvc.Abstractions/Properties/AssemblyInfo.cs @@ -3,5 +3,35 @@ using System.Runtime.CompilerServices; +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.ApiExplorer, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Core, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Cors, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.DataAnnotations, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Formatters.Json, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Formatters.Xml, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Localization, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Razor, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.RazorPages, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.TagHelpers, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Testing, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.ViewFeatures, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] + [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Abstractions.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.ApiExplorer.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Core.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Core.TestCommon, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Cors.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.DataAnnotations.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Formatters.Json.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Formatters.Xml.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.IntegrationTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Localization.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Razor.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.RazorPages.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.TagHelpers.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.ViewFeatures.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Views.TestCommon, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] + [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] diff --git a/src/Microsoft.AspNetCore.Mvc.ApiExplorer/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj b/src/Microsoft.AspNetCore.Mvc.ApiExplorer/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj index 9ea5be90f4..5ccb12bef4 100644 --- a/src/Microsoft.AspNetCore.Mvc.ApiExplorer/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj +++ b/src/Microsoft.AspNetCore.Mvc.ApiExplorer/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj @@ -10,10 +10,6 @@ - - - - diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ConsumesAttribute.cs b/src/Microsoft.AspNetCore.Mvc.Core/ConsumesAttribute.cs index 7d63adcabf..7e047b1367 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ConsumesAttribute.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ConsumesAttribute.cs @@ -7,13 +7,13 @@ using System.Linq; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.ActionConstraints; using Microsoft.AspNetCore.Mvc.ApiExplorer; -using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.Internal; using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Routing.EndpointConstraints; using Microsoft.Net.Http.Headers; +using Resources = Microsoft.AspNetCore.Mvc.Core.Resources; namespace Microsoft.AspNetCore.Mvc { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ActionSelector.cs b/src/Microsoft.AspNetCore.Mvc.Core/Internal/ActionSelector.cs index b3d14d1be8..0f9a1cb6e4 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ActionSelector.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Internal/ActionSelector.cs @@ -8,11 +8,11 @@ using System.Linq; using System.Threading; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.ActionConstraints; -using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Internal; using Microsoft.Extensions.Logging; +using Resources = Microsoft.AspNetCore.Mvc.Core.Resources; namespace Microsoft.AspNetCore.Mvc.Internal { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/AttributeRoute.cs b/src/Microsoft.AspNetCore.Mvc.Core/Internal/AttributeRoute.cs index bf1f4d575d..9d307e7e23 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/AttributeRoute.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Internal/AttributeRoute.cs @@ -6,13 +6,13 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Abstractions; -using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Routing.Template; using Microsoft.AspNetCore.Routing.Tree; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Internal; +using Resources = Microsoft.AspNetCore.Mvc.Core.Resources; namespace Microsoft.AspNetCore.Mvc.Internal { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionDescriptorBuilder.cs b/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionDescriptorBuilder.cs index 18ae818293..f343701440 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionDescriptorBuilder.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionDescriptorBuilder.cs @@ -10,9 +10,9 @@ using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.ActionConstraints; using Microsoft.AspNetCore.Mvc.ApplicationModels; using Microsoft.AspNetCore.Mvc.Controllers; -using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Routing; +using Resources = Microsoft.AspNetCore.Mvc.Core.Resources; namespace Microsoft.AspNetCore.Mvc.Internal { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionInvoker.cs b/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionInvoker.cs index f020c86bf3..767ed08505 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionInvoker.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Internal/ControllerActionInvoker.cs @@ -7,11 +7,11 @@ using System.Diagnostics; using System.Runtime.ExceptionServices; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Abstractions; -using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.Extensions.Internal; using Microsoft.Extensions.Logging; +using Resources = Microsoft.AspNetCore.Mvc.Core.Resources; namespace Microsoft.AspNetCore.Mvc.Internal { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcAttributeRouteHandler.cs b/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcAttributeRouteHandler.cs index 93f7277522..c40318e2d9 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcAttributeRouteHandler.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcAttributeRouteHandler.cs @@ -5,10 +5,10 @@ using System; using System.Diagnostics; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Abstractions; -using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Logging; +using Resources = Microsoft.AspNetCore.Mvc.Core.Resources; namespace Microsoft.AspNetCore.Mvc.Internal { diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcEndpointDataSource.cs b/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcEndpointDataSource.cs index 786ce62b61..2d181e9754 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcEndpointDataSource.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcEndpointDataSource.cs @@ -293,6 +293,25 @@ namespace Microsoft.AspNetCore.Mvc.Internal return invoker.InvokeAsync(); }; + var metadataCollection = BuildEndpointMetadata(action, routeName, source); + var endpoint = new MatcherEndpoint( + next => invokerDelegate, + template, + new RouteValueDictionary(nonInlineDefaults), + new RouteValueDictionary(action.RouteValues), + order, + metadataCollection, + action.DisplayName); + + // Use defaults after the endpoint is created as it merges both the inline and + // non-inline defaults into one. + EnsureRequiredValuesInDefaults(endpoint.RequiredValues, endpoint.Defaults); + + return endpoint; + } + + private static EndpointMetadataCollection BuildEndpointMetadata(ActionDescriptor action, string routeName, object source) + { var metadata = new List(); // REVIEW: Used for debugging. Consider removing before release metadata.Add(source); @@ -312,30 +331,27 @@ namespace Microsoft.AspNetCore.Mvc.Internal if (action.ActionConstraints != null && action.ActionConstraints.Count > 0) { + // REVIEW: What is the best way to pick up endpoint constraints of an ActionDescriptor? + // Currently they need to implement IActionConstraintMetadata foreach (var actionConstraint in action.ActionConstraints) { if (actionConstraint is HttpMethodActionConstraint httpMethodActionConstraint) { metadata.Add(new HttpMethodEndpointConstraint(httpMethodActionConstraint.HttpMethods)); } + else if (actionConstraint is IEndpointConstraintMetadata) + { + // The constraint might have been added earlier, e.g. it is also a filter descriptor + if (!metadata.Contains(actionConstraint)) + { + metadata.Add(actionConstraint); + } + } } } var metadataCollection = new EndpointMetadataCollection(metadata); - var endpoint = new MatcherEndpoint( - next => invokerDelegate, - template, - new RouteValueDictionary(nonInlineDefaults), - new RouteValueDictionary(action.RouteValues), - order, - metadataCollection, - action.DisplayName); - - // Use defaults after the endpoint is created as it merges both the inline and - // non-inline defaults into one. - EnsureRequiredValuesInDefaults(endpoint.RequiredValues, endpoint.Defaults); - - return endpoint; + return metadataCollection; } // Ensure required values are a subset of defaults diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Microsoft.AspNetCore.Mvc.Core.csproj b/src/Microsoft.AspNetCore.Mvc.Core/Microsoft.AspNetCore.Mvc.Core.csproj index 8014ae9cc2..7fc4891804 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Microsoft.AspNetCore.Mvc.Core.csproj +++ b/src/Microsoft.AspNetCore.Mvc.Core/Microsoft.AspNetCore.Mvc.Core.csproj @@ -24,24 +24,27 @@ Microsoft.AspNetCore.Mvc.RouteAttribute - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Properties/AssemblyInfo.cs b/src/Microsoft.AspNetCore.Mvc.Core/Properties/AssemblyInfo.cs index 964f733284..31781090a1 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Properties/AssemblyInfo.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Properties/AssemblyInfo.cs @@ -4,8 +4,36 @@ using System.Runtime.CompilerServices; using Microsoft.AspNetCore.Mvc.Formatters; -[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: TypeForwardedTo(typeof(InputFormatterException))] + +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.ApiExplorer, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Cors, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.DataAnnotations, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Formatters.Json, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Formatters.Xml, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Localization, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Razor, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.RazorPages, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.TagHelpers, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Testing, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.ViewFeatures, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] + +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Abstractions.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.ApiExplorer.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Core.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Core.TestCommon, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Cors.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.DataAnnotations.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Formatters.Json.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Formatters.Xml.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.IntegrationTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Localization.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Razor.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.RazorPages.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.TagHelpers.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.ViewFeatures.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Views.TestCommon, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] + [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] -[assembly: TypeForwardedTo(typeof(InputFormatterException))] diff --git a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj index 336474aae0..776a31be2d 100644 --- a/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj +++ b/src/Microsoft.AspNetCore.Mvc.DataAnnotations/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj @@ -11,8 +11,6 @@ - - diff --git a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/Microsoft.AspNetCore.Mvc.Formatters.Xml.csproj b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/Microsoft.AspNetCore.Mvc.Formatters.Xml.csproj index b716f5cbbb..6458ed6838 100644 --- a/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/Microsoft.AspNetCore.Mvc.Formatters.Xml.csproj +++ b/src/Microsoft.AspNetCore.Mvc.Formatters.Xml/Microsoft.AspNetCore.Mvc.Formatters.Xml.csproj @@ -10,8 +10,5 @@ - - - diff --git a/src/Microsoft.AspNetCore.Mvc.Localization/Microsoft.AspNetCore.Mvc.Localization.csproj b/src/Microsoft.AspNetCore.Mvc.Localization/Microsoft.AspNetCore.Mvc.Localization.csproj index ea50d25312..2105530c41 100644 --- a/src/Microsoft.AspNetCore.Mvc.Localization/Microsoft.AspNetCore.Mvc.Localization.csproj +++ b/src/Microsoft.AspNetCore.Mvc.Localization/Microsoft.AspNetCore.Mvc.Localization.csproj @@ -17,7 +17,6 @@ Microsoft.AspNetCore.Mvc.Localization.IViewLocalizer - diff --git a/src/Microsoft.AspNetCore.Mvc.Razor/IModelTypeProvider.cs b/src/Microsoft.AspNetCore.Mvc.Razor/IModelTypeProvider.cs new file mode 100644 index 0000000000..7485a15694 --- /dev/null +++ b/src/Microsoft.AspNetCore.Mvc.Razor/IModelTypeProvider.cs @@ -0,0 +1,9 @@ +using System; + +namespace Microsoft.AspNetCore.Mvc.Razor +{ + internal interface IModelTypeProvider + { + Type GetModelType(); + } +} diff --git a/src/Microsoft.AspNetCore.Mvc.Razor/Microsoft.AspNetCore.Mvc.Razor.csproj b/src/Microsoft.AspNetCore.Mvc.Razor/Microsoft.AspNetCore.Mvc.Razor.csproj index f08f8465c9..decdf16adf 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor/Microsoft.AspNetCore.Mvc.Razor.csproj +++ b/src/Microsoft.AspNetCore.Mvc.Razor/Microsoft.AspNetCore.Mvc.Razor.csproj @@ -19,10 +19,6 @@ - - - - diff --git a/src/Microsoft.AspNetCore.Mvc.Razor/Properties/AssemblyInfo.cs b/src/Microsoft.AspNetCore.Mvc.Razor/Properties/AssemblyInfo.cs index 831fbe57e1..5bd324d5d6 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor/Properties/AssemblyInfo.cs +++ b/src/Microsoft.AspNetCore.Mvc.Razor/Properties/AssemblyInfo.cs @@ -3,5 +3,7 @@ using System.Runtime.CompilerServices; +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.RazorPages, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] + [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Razor.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/Microsoft.AspNetCore.Mvc.Razor/RazorPageActivator.cs b/src/Microsoft.AspNetCore.Mvc.Razor/RazorPageActivator.cs index 758255f494..cc9a20c8cb 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor/RazorPageActivator.cs +++ b/src/Microsoft.AspNetCore.Mvc.Razor/RazorPageActivator.cs @@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Mvc.Razor.Internal; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Mvc.ViewFeatures; +using Microsoft.Extensions.Internal; namespace Microsoft.AspNetCore.Mvc.Razor { @@ -19,7 +20,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor { // Name of the "public TModel Model" property on RazorPage private const string ModelPropertyName = "Model"; - private readonly ConcurrentDictionary _activationInfo; + private readonly ConcurrentDictionary _activationInfo; private readonly IModelMetadataProvider _metadataProvider; // Value accessors for common singleton properties activated in a RazorPage. @@ -36,7 +37,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor HtmlEncoder htmlEncoder, IModelExpressionProvider modelExpressionProvider) { - _activationInfo = new ConcurrentDictionary(); + _activationInfo = new ConcurrentDictionary(); _metadataProvider = metadataProvider; _propertyAccessors = new RazorPagePropertyActivator.PropertyValueAccessors @@ -62,26 +63,76 @@ namespace Microsoft.AspNetCore.Mvc.Razor throw new ArgumentNullException(nameof(context)); } + var propertyActivator = GetOrAddCacheEntry(page); + propertyActivator.Activate(page, context); + } + + internal RazorPagePropertyActivator GetOrAddCacheEntry(IRazorPage page) + { var pageType = page.GetType(); - RazorPagePropertyActivator propertyActivator; - if (!_activationInfo.TryGetValue(pageType, out propertyActivator)) + Type providedModelType = null; + if (page is IModelTypeProvider modelTypeProvider) + { + providedModelType = modelTypeProvider.GetModelType(); + } + + // We only need to vary by providedModelType since it varies at runtime. Defined model type + // is synonymous with the pageType and consequently does not need to be accounted for in the cache key. + var cacheKey = new CacheKey(pageType, providedModelType); + if (!_activationInfo.TryGetValue(cacheKey, out var propertyActivator)) { // Look for a property named "Model". If it is non-null, we'll assume this is // the equivalent of TModel Model property on RazorPage. // // Otherwise if we don't have a model property the activator will just skip setting // the view data. - var modelType = pageType.GetRuntimeProperty(ModelPropertyName)?.PropertyType; + var modelType = providedModelType; + if (modelType == null) + { + modelType = pageType.GetRuntimeProperty(ModelPropertyName)?.PropertyType; + } + propertyActivator = new RazorPagePropertyActivator( pageType, modelType, _metadataProvider, _propertyAccessors); - propertyActivator = _activationInfo.GetOrAdd(pageType, propertyActivator); + propertyActivator = _activationInfo.GetOrAdd(cacheKey, propertyActivator); } - propertyActivator.Activate(page, context); + return propertyActivator; + } + + private readonly struct CacheKey : IEquatable + { + public CacheKey(Type pageType, Type providedModelType) + { + PageType = pageType; + ProvidedModelType = providedModelType; + } + + public Type PageType { get; } + + public Type ProvidedModelType { get; } + + public bool Equals(CacheKey other) + { + return PageType == other.PageType && + ProvidedModelType == other.ProvidedModelType; + } + + public override int GetHashCode() + { + var hashCodeCombiner = HashCodeCombiner.Start(); + hashCodeCombiner.Add(PageType); + if (ProvidedModelType != null) + { + hashCodeCombiner.Add(ProvidedModelType); + } + + return hashCodeCombiner.CombinedHash; + } } } } \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Mvc.Razor/RazorView.cs b/src/Microsoft.AspNetCore.Mvc.Razor/RazorView.cs index 240c80681c..10ef8139da 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor/RazorView.cs +++ b/src/Microsoft.AspNetCore.Mvc.Razor/RazorView.cs @@ -96,6 +96,8 @@ namespace Microsoft.AspNetCore.Mvc.Razor /// public IReadOnlyList ViewStartPages { get; } + internal Action OnAfterPageActivated { get; set; } + /// public virtual async Task RenderAsync(ViewContext context) { @@ -167,6 +169,8 @@ namespace Microsoft.AspNetCore.Mvc.Razor page.ViewContext = context; _pageActivator.Activate(page, context); + OnAfterPageActivated?.Invoke(page, context); + _diagnosticSource.BeforeViewPage(page, context); try diff --git a/src/Microsoft.AspNetCore.Mvc.RazorPages/DependencyInjection/MvcRazorPagesMvcBuilderExtensions.cs b/src/Microsoft.AspNetCore.Mvc.RazorPages/DependencyInjection/MvcRazorPagesMvcBuilderExtensions.cs index 6340d87005..78a301947a 100644 --- a/src/Microsoft.AspNetCore.Mvc.RazorPages/DependencyInjection/MvcRazorPagesMvcBuilderExtensions.cs +++ b/src/Microsoft.AspNetCore.Mvc.RazorPages/DependencyInjection/MvcRazorPagesMvcBuilderExtensions.cs @@ -5,6 +5,7 @@ using System; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc.Razor; using Microsoft.AspNetCore.Mvc.RazorPages; +using Resources = Microsoft.AspNetCore.Mvc.RazorPages.Resources; namespace Microsoft.Extensions.DependencyInjection { diff --git a/src/Microsoft.AspNetCore.Mvc.RazorPages/DependencyInjection/MvcRazorPagesMvcCoreBuilderExtensions.cs b/src/Microsoft.AspNetCore.Mvc.RazorPages/DependencyInjection/MvcRazorPagesMvcCoreBuilderExtensions.cs index 35a6e75a45..2f17cfbbca 100644 --- a/src/Microsoft.AspNetCore.Mvc.RazorPages/DependencyInjection/MvcRazorPagesMvcCoreBuilderExtensions.cs +++ b/src/Microsoft.AspNetCore.Mvc.RazorPages/DependencyInjection/MvcRazorPagesMvcCoreBuilderExtensions.cs @@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure; using Microsoft.AspNetCore.Mvc.RazorPages.Internal; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.Options; +using Resources = Microsoft.AspNetCore.Mvc.RazorPages.Resources; namespace Microsoft.Extensions.DependencyInjection { diff --git a/src/Microsoft.AspNetCore.Mvc.RazorPages/Infrastructure/PageResultExecutor.cs b/src/Microsoft.AspNetCore.Mvc.RazorPages/Infrastructure/PageResultExecutor.cs index 10539c0b2a..967c6fa07d 100644 --- a/src/Microsoft.AspNetCore.Mvc.RazorPages/Infrastructure/PageResultExecutor.cs +++ b/src/Microsoft.AspNetCore.Mvc.RazorPages/Infrastructure/PageResultExecutor.cs @@ -76,13 +76,29 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure } var viewContext = result.Page.ViewContext; + var pageAdapter = new RazorPageAdapter(result.Page, pageContext.ActionDescriptor.DeclaredModelTypeInfo); + viewContext.View = new RazorView( _razorViewEngine, _razorPageActivator, viewStarts, - new RazorPageAdapter(result.Page), + pageAdapter, _htmlEncoder, - _diagnosticSource); + _diagnosticSource) + { + OnAfterPageActivated = (page, currentViewContext) => + { + if (page != pageAdapter) + { + return; + } + + // ViewContext is always activated with the "right" ViewData type. + // Copy that over to the PageContext since PageContext.ViewData is exposed + // as the ViewData property on the Page that the user works with. + pageContext.ViewData = currentViewContext.ViewData; + }, + }; return ExecuteAsync(viewContext, result.ContentType, result.StatusCode); } diff --git a/src/Microsoft.AspNetCore.Mvc.RazorPages/Infrastructure/RazorPageAdapter.cs b/src/Microsoft.AspNetCore.Mvc.RazorPages/Infrastructure/RazorPageAdapter.cs index 452161083b..52c319f22a 100644 --- a/src/Microsoft.AspNetCore.Mvc.RazorPages/Infrastructure/RazorPageAdapter.cs +++ b/src/Microsoft.AspNetCore.Mvc.RazorPages/Infrastructure/RazorPageAdapter.cs @@ -14,10 +14,12 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure // // The page gets activated before handler methods run, but the RazorView will also activate // each page. - public class RazorPageAdapter : IRazorPage + public class RazorPageAdapter : IRazorPage, IModelTypeProvider { private readonly RazorPageBase _page; + private readonly Type _modelType; + [Obsolete("This constructor is obsolete and will be removed in a future version.")] public RazorPageAdapter(RazorPageBase page) { if (page == null) @@ -28,6 +30,12 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure _page = page; } + public RazorPageAdapter(RazorPageBase page, Type modelType) + { + _page = page ?? throw new ArgumentNullException(nameof(page)); + _modelType = modelType ?? throw new ArgumentNullException(nameof(modelType)); + } + public ViewContext ViewContext { get { return _page.ViewContext; } @@ -75,5 +83,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure { return _page.ExecuteAsync(); } + + Type IModelTypeProvider.GetModelType() => _modelType; } } diff --git a/src/Microsoft.AspNetCore.Mvc.RazorPages/Microsoft.AspNetCore.Mvc.RazorPages.csproj b/src/Microsoft.AspNetCore.Mvc.RazorPages/Microsoft.AspNetCore.Mvc.RazorPages.csproj index f0be433ea5..ff5c61f35b 100644 --- a/src/Microsoft.AspNetCore.Mvc.RazorPages/Microsoft.AspNetCore.Mvc.RazorPages.csproj +++ b/src/Microsoft.AspNetCore.Mvc.RazorPages/Microsoft.AspNetCore.Mvc.RazorPages.csproj @@ -10,16 +10,6 @@ - - - - - - - - - - diff --git a/src/Microsoft.AspNetCore.Mvc.TagHelpers/Microsoft.AspNetCore.Mvc.TagHelpers.csproj b/src/Microsoft.AspNetCore.Mvc.TagHelpers/Microsoft.AspNetCore.Mvc.TagHelpers.csproj index 75d40d73c2..23fce08ef7 100644 --- a/src/Microsoft.AspNetCore.Mvc.TagHelpers/Microsoft.AspNetCore.Mvc.TagHelpers.csproj +++ b/src/Microsoft.AspNetCore.Mvc.TagHelpers/Microsoft.AspNetCore.Mvc.TagHelpers.csproj @@ -19,8 +19,6 @@ - - diff --git a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj index 27d839320d..79ef166f49 100644 --- a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj +++ b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj @@ -19,16 +19,8 @@ Microsoft.AspNetCore.Mvc.ViewComponent - - - - - - - - diff --git a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/TestResources.cs b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/TestResources.cs index 4d02719fa8..86f52aacbd 100644 --- a/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/TestResources.cs +++ b/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test/Internal/TestResources.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Globalization; -using Microsoft.AspNetCore.Mvc.DataAnnotations.Test; +using Resources = Microsoft.AspNetCore.Mvc.DataAnnotations.Test.Resources; namespace Microsoft.AspNetCore.Mvc.ModelBinding { diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/RazorPagesWithBasePathTest.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/RazorPagesWithBasePathTest.cs index 6d43c53c97..0a645b9e03 100644 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/RazorPagesWithBasePathTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/RazorPagesWithBasePathTest.cs @@ -607,6 +607,22 @@ Hello from /Pages/Shared/"; Assert.Equal(HttpStatusCode.OK, response.StatusCode); } + [Fact] + public async Task ViewDataSetInViewStart_IsAvailableToPage() + { + // Arrange & Act + var document = await Client.GetHtmlDocumentAsync("/ViewData/ViewDataSetInViewStart"); + + // Assert + var valueSetInViewStart = document.RequiredQuerySelector("#valuefromviewstart").TextContent; + var valueSetInPageModel = document.RequiredQuerySelector("#valuefrompagemodel").TextContent; + var valueSetInPage = document.RequiredQuerySelector("#valuefrompage").TextContent; + + Assert.Equal("Value from _ViewStart", valueSetInViewStart); + Assert.Equal("Value from Page Model", valueSetInPageModel); + Assert.Equal("Value from Page", valueSetInPage); + } + private async Task AddAntiforgeryHeadersAsync(HttpRequestMessage request) { var response = await Client.GetAsync(request.RequestUri); diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/VersioningDispatchingTests.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/VersioningDispatchingTests.cs new file mode 100644 index 0000000000..ff0c8e700c --- /dev/null +++ b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/VersioningDispatchingTests.cs @@ -0,0 +1,13 @@ +// 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. + +namespace Microsoft.AspNetCore.Mvc.FunctionalTests +{ + public class VersioningDispatchingTests : VersioningTestsBase + { + public VersioningDispatchingTests(MvcTestFixture fixture) + : base(fixture) + { + } + } +} \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/VersioningTests.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/VersioningTests.cs index 02a86d0871..8490fda117 100644 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/VersioningTests.cs +++ b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/VersioningTests.cs @@ -1,562 +1,13 @@ // 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.Collections.Generic; -using System.Net; -using System.Net.Http; -using System.Threading.Tasks; -using Newtonsoft.Json; -using Xunit; - namespace Microsoft.AspNetCore.Mvc.FunctionalTests { - public class VersioningTests : IClassFixture> + public class VersioningTests : VersioningTestsBase { public VersioningTests(MvcTestFixture fixture) + : base(fixture) { - Client = fixture.CreateDefaultClient(); - } - - public HttpClient Client { get; } - - [Theory] - [InlineData("1")] - [InlineData("2")] - public async Task AttributeRoutedAction_WithVersionedRoutes_IsNotAmbiguous(string version) - { - // Arrange - var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/api/Addresses?version=" + version); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var body = await response.Content.ReadAsStringAsync(); - var result = JsonConvert.DeserializeObject(body); - - Assert.Contains("api/addresses", result.ExpectedUrls); - Assert.Equal("Address", result.Controller); - Assert.Equal("GetV" + version, result.Action); - } - - [Theory] - [InlineData("1")] - [InlineData("2")] - public async Task AttributeRoutedAction_WithAmbiguousVersionedRoutes_CanBeDisambiguatedUsingOrder(string version) - { - // Arrange - var query = "?version=" + version; - var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/api/Addresses/All" + query); - - // Act - - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var body = await response.Content.ReadAsStringAsync(); - var result = JsonConvert.DeserializeObject(body); - - Assert.Contains("/api/addresses/all?version=" + version, result.ExpectedUrls); - Assert.Equal("Address", result.Controller); - Assert.Equal("GetAllV" + version, result.Action); - } - - [Fact] - public async Task VersionedApi_CanReachV1Operations_OnTheSameController_WithNoVersionSpecified() - { - // Arrange - var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Tickets"); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var body = await response.Content.ReadAsStringAsync(); - var result = JsonConvert.DeserializeObject(body); - - Assert.Equal("Tickets", result.Controller); - Assert.Equal("Get", result.Action); - - Assert.DoesNotContain("id", result.RouteValues.Keys); - } - - [Fact] - public async Task VersionedApi_CanReachV1Operations_OnTheSameController_WithVersionSpecified() - { - // Arrange - var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Tickets?version=2"); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var body = await response.Content.ReadAsStringAsync(); - var result = JsonConvert.DeserializeObject(body); - - Assert.Equal("Tickets", result.Controller); - Assert.Equal("Get", result.Action); - } - - [Fact] - public async Task VersionedApi_CanReachV1OperationsWithParameters_OnTheSameController() - { - // Arrange - var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Tickets/5"); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var body = await response.Content.ReadAsStringAsync(); - var result = JsonConvert.DeserializeObject(body); - - Assert.Equal("Tickets", result.Controller); - Assert.Equal("GetById", result.Action); - } - - [Fact] - public async Task VersionedApi_CanReachV1OperationsWithParameters_OnTheSameController_WithVersionSpecified() - { - // Arrange - var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Tickets/5?version=2"); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var body = await response.Content.ReadAsStringAsync(); - var result = JsonConvert.DeserializeObject(body); - - Assert.Equal("Tickets", result.Controller); - Assert.Equal("GetById", result.Action); - Assert.NotEmpty(result.RouteValues); - - Assert.Contains( - new KeyValuePair("id", "5"), - result.RouteValues); - } - - [Theory] - [InlineData("2")] - [InlineData("3")] - [InlineData("4")] - public async Task VersionedApi_CanReachOtherVersionOperations_OnTheSameController(string version) - { - // Arrange - var message = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Tickets?version=" + version); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var body = await response.Content.ReadAsStringAsync(); - var result = JsonConvert.DeserializeObject(body); - - Assert.Equal("Tickets", result.Controller); - Assert.Equal("Post", result.Action); - Assert.NotEmpty(result.RouteValues); - - Assert.DoesNotContain( - new KeyValuePair("id", "5"), - result.RouteValues); - } - - [Fact] - public async Task VersionedApi_CanNotReachOtherVersionOperations_OnTheSameController_WithNoVersionSpecified() - { - // Arrange - var message = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Tickets"); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); - - var body = await response.Content.ReadAsByteArrayAsync(); - Assert.Empty(body); - } - - [Theory] - [InlineData("PUT", "Put", "2")] - [InlineData("PUT", "Put", "3")] - [InlineData("PUT", "Put", "4")] - [InlineData("DELETE", "Delete", "2")] - [InlineData("DELETE", "Delete", "3")] - [InlineData("DELETE", "Delete", "4")] - public async Task VersionedApi_CanReachOtherVersionOperationsWithParameters_OnTheSameController( - string method, - string action, - string version) - { - // Arrange - var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Tickets/5?version=" + version); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var body = await response.Content.ReadAsStringAsync(); - var result = JsonConvert.DeserializeObject(body); - - Assert.Equal("Tickets", result.Controller); - Assert.Equal(action, result.Action); - Assert.NotEmpty(result.RouteValues); - - Assert.Contains( - new KeyValuePair("id", "5"), - result.RouteValues); - } - - [Theory] - [InlineData("PUT")] - [InlineData("DELETE")] - public async Task VersionedApi_CanNotReachOtherVersionOperationsWithParameters_OnTheSameController_WithNoVersionSpecified(string method) - { - // Arrange - var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Tickets/5"); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); - - var body = await response.Content.ReadAsByteArrayAsync(); - Assert.Empty(body); - } - - [Theory] - [InlineData("3")] - [InlineData("4")] - [InlineData("5")] - public async Task VersionedApi_CanUseOrderToDisambiguate_OverlappingVersionRanges(string version) - { - // Arrange - var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Books?version=" + version); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var body = await response.Content.ReadAsStringAsync(); - var result = JsonConvert.DeserializeObject(body); - - Assert.Equal("Books", result.Controller); - Assert.Equal("GetBreakingChange", result.Action); - } - - [Theory] - [InlineData("1")] - [InlineData("2")] - [InlineData("6")] - public async Task VersionedApi_OverlappingVersionRanges_FallsBackToLowerOrderAction(string version) - { - // Arrange - var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Books?version=" + version); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var body = await response.Content.ReadAsStringAsync(); - var result = JsonConvert.DeserializeObject(body); - - Assert.Equal("Books", result.Controller); - Assert.Equal("Get", result.Action); - } - - - [Theory] - [InlineData("GET", "Get")] - [InlineData("POST", "Post")] - public async Task VersionedApi_CanReachV1Operations_OnTheOriginalController_WithNoVersionSpecified(string method, string action) - { - // Arrange - var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Movies"); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var body = await response.Content.ReadAsStringAsync(); - var result = JsonConvert.DeserializeObject(body); - - Assert.Equal("Movies", result.Controller); - Assert.Equal(action, result.Action); - } - - [Theory] - [InlineData("GET", "Get")] - [InlineData("POST", "Post")] - public async Task VersionedApi_CanReachV1Operations_OnTheOriginalController_WithVersionSpecified(string method, string action) - { - // Arrange - var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Movies?version=2"); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var body = await response.Content.ReadAsStringAsync(); - var result = JsonConvert.DeserializeObject(body); - - Assert.Equal("Movies", result.Controller); - Assert.Equal(action, result.Action); - } - - [Theory] - [InlineData("GET", "GetById")] - [InlineData("PUT", "Put")] - [InlineData("DELETE", "Delete")] - public async Task VersionedApi_CanReachV1OperationsWithParameters_OnTheOriginalController(string method, string action) - { - // Arrange - var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Movies/5"); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var body = await response.Content.ReadAsStringAsync(); - var result = JsonConvert.DeserializeObject(body); - - Assert.Equal("Movies", result.Controller); - Assert.Equal(action, result.Action); - } - - [Theory] - [InlineData("GET", "GetById")] - [InlineData("DELETE", "Delete")] - public async Task VersionedApi_CanReachV1OperationsWithParameters_OnTheOriginalController_WithVersionSpecified(string method, string action) - { - // Arrange - var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Movies/5?version=2"); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var body = await response.Content.ReadAsStringAsync(); - var result = JsonConvert.DeserializeObject(body); - - Assert.Equal("Movies", result.Controller); - Assert.Equal(action, result.Action); - } - - [Fact] - public async Task VersionedApi_CanReachOtherVersionOperationsWithParameters_OnTheV2Controller() - { - // Arrange - var message = new HttpRequestMessage(HttpMethod.Put, "http://localhost/Movies/5?version=2"); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var body = await response.Content.ReadAsStringAsync(); - var result = JsonConvert.DeserializeObject(body); - - Assert.Equal("MoviesV2", result.Controller); - Assert.Equal("Put", result.Action); - Assert.NotEmpty(result.RouteValues); - } - - [Theory] - [InlineData("v1/Pets")] - [InlineData("v2/Pets")] - public async Task VersionedApi_CanHaveTwoRoutesWithVersionOnTheUrl_OnTheSameAction(string url) - { - // Arrange - var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/" + url); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var body = await response.Content.ReadAsStringAsync(); - var result = JsonConvert.DeserializeObject(body); - - Assert.Equal("Pets", result.Controller); - Assert.Equal("Get", result.Action); - } - - [Theory] - [InlineData("v1/Pets/5", "V1")] - [InlineData("v2/Pets/5", "V2")] - public async Task VersionedApi_CanHaveTwoRoutesWithVersionOnTheUrl_OnDifferentActions(string url, string version) - { - // Arrange - var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/" + url); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var body = await response.Content.ReadAsStringAsync(); - var result = JsonConvert.DeserializeObject(body); - - Assert.Equal("Pets", result.Controller); - Assert.Equal("Get" + version, result.Action); - } - - [Theory] - [InlineData("v1/Pets", "V1")] - [InlineData("v2/Pets", "V2")] - public async Task VersionedApi_CanHaveTwoRoutesWithVersionOnTheUrl_OnDifferentActions_WithInlineConstraint(string url, string version) - { - // Arrange - var message = new HttpRequestMessage(HttpMethod.Post, "http://localhost/" + url); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var body = await response.Content.ReadAsStringAsync(); - var result = JsonConvert.DeserializeObject(body); - - Assert.Equal("Pets", result.Controller); - Assert.Equal("Post" + version, result.Action); - } - - [Theory] - [InlineData("Customers/5", "?version=1", "Get")] - [InlineData("Customers/5", "?version=2", "Get")] - [InlineData("Customers/5", "?version=3", "GetV3ToV5")] - [InlineData("Customers/5", "?version=4", "GetV3ToV5")] - [InlineData("Customers/5", "?version=5", "GetV3ToV5")] - public async Task VersionedApi_CanProvideVersioningInformation_UsingPlainActionConstraint(string url, string query, string actionName) - { - // Arrange - var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/" + url + query); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var body = await response.Content.ReadAsStringAsync(); - var result = JsonConvert.DeserializeObject(body); - - Assert.Equal("Customers", result.Controller); - Assert.Equal(actionName, result.Action); - } - - [Fact] - public async Task VersionedApi_ConstraintOrder_IsRespected() - { - // Arrange - var message = new HttpRequestMessage(HttpMethod.Post, "http://localhost/" + "Customers?version=2"); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var body = await response.Content.ReadAsStringAsync(); - var result = JsonConvert.DeserializeObject(body); - - Assert.Equal("Customers", result.Controller); - Assert.Equal("AnyV2OrHigher", result.Action); - } - - [Fact] - public async Task VersionedApi_CanUseConstraintOrder_ToChangeSelectedAction() - { - // Arrange - var message = new HttpRequestMessage(HttpMethod.Delete, "http://localhost/" + "Customers/5?version=2"); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var body = await response.Content.ReadAsStringAsync(); - var result = JsonConvert.DeserializeObject(body); - - Assert.Equal("Customers", result.Controller); - Assert.Equal("Delete", result.Action); - } - - [Theory] - [InlineData("1")] - [InlineData("2")] - public async Task VersionedApi_MultipleVersionsUsingAttributeRouting_OnTheSameMethod(string version) - { - // Arrange - var path = "/" + version + "/Vouchers?version=" + version; - var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost" + path); - - // Act - var response = await Client.SendAsync(message); - - // Assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - var body = await response.Content.ReadAsStringAsync(); - var result = JsonConvert.DeserializeObject(body); - - Assert.Equal("Vouchers", result.Controller); - Assert.Equal("GetVouchersMultipleVersions", result.Action); - - var actualUrl = Assert.Single(result.ExpectedUrls); - Assert.Equal(path, actualUrl); - } - - private class RoutingResult - { - public string[] ExpectedUrls { get; set; } - - public string ActualUrl { get; set; } - - public Dictionary RouteValues { get; set; } - - public string RouteName { get; set; } - - public string Action { get; set; } - - public string Controller { get; set; } - - public string Link { get; set; } } } } \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/VersioningTestsBase.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/VersioningTestsBase.cs new file mode 100644 index 0000000000..46cfdbe4a8 --- /dev/null +++ b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/VersioningTestsBase.cs @@ -0,0 +1,568 @@ +// 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.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Hosting; +using Newtonsoft.Json; +using Xunit; + +namespace Microsoft.AspNetCore.Mvc.FunctionalTests +{ + public abstract class VersioningTestsBase : IClassFixture> where TStartup : class + { + protected VersioningTestsBase(MvcTestFixture fixture) + { + var factory = fixture.Factories.FirstOrDefault() ?? fixture.WithWebHostBuilder(ConfigureWebHostBuilder); + Client = factory.CreateDefaultClient(); + } + + private static void ConfigureWebHostBuilder(IWebHostBuilder builder) => + builder.UseStartup(); + + public HttpClient Client { get; } + + [Theory] + [InlineData("1")] + [InlineData("2")] + public async Task AttributeRoutedAction_WithVersionedRoutes_IsNotAmbiguous(string version) + { + // Arrange + var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/api/Addresses?version=" + version); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var body = await response.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(body); + + Assert.Contains("api/addresses", result.ExpectedUrls); + Assert.Equal("Address", result.Controller); + Assert.Equal("GetV" + version, result.Action); + } + + [Theory] + [InlineData("1")] + [InlineData("2")] + public async Task AttributeRoutedAction_WithAmbiguousVersionedRoutes_CanBeDisambiguatedUsingOrder(string version) + { + // Arrange + var query = "?version=" + version; + var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/api/Addresses/All" + query); + + // Act + + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var body = await response.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(body); + + Assert.Contains("/api/addresses/all?version=" + version, result.ExpectedUrls); + Assert.Equal("Address", result.Controller); + Assert.Equal("GetAllV" + version, result.Action); + } + + [Fact] + public async Task VersionedApi_CanReachV1Operations_OnTheSameController_WithNoVersionSpecified() + { + // Arrange + var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Tickets"); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var body = await response.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(body); + + Assert.Equal("Tickets", result.Controller); + Assert.Equal("Get", result.Action); + + Assert.DoesNotContain("id", result.RouteValues.Keys); + } + + [Fact] + public async Task VersionedApi_CanReachV1Operations_OnTheSameController_WithVersionSpecified() + { + // Arrange + var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Tickets?version=2"); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var body = await response.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(body); + + Assert.Equal("Tickets", result.Controller); + Assert.Equal("Get", result.Action); + } + + [Fact] + public async Task VersionedApi_CanReachV1OperationsWithParameters_OnTheSameController() + { + // Arrange + var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Tickets/5"); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var body = await response.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(body); + + Assert.Equal("Tickets", result.Controller); + Assert.Equal("GetById", result.Action); + } + + [Fact] + public async Task VersionedApi_CanReachV1OperationsWithParameters_OnTheSameController_WithVersionSpecified() + { + // Arrange + var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Tickets/5?version=2"); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var body = await response.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(body); + + Assert.Equal("Tickets", result.Controller); + Assert.Equal("GetById", result.Action); + Assert.NotEmpty(result.RouteValues); + + Assert.Contains( + new KeyValuePair("id", "5"), + result.RouteValues); + } + + [Theory] + [InlineData("2")] + [InlineData("3")] + [InlineData("4")] + public async Task VersionedApi_CanReachOtherVersionOperations_OnTheSameController(string version) + { + // Arrange + var message = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Tickets?version=" + version); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var body = await response.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(body); + + Assert.Equal("Tickets", result.Controller); + Assert.Equal("Post", result.Action); + Assert.NotEmpty(result.RouteValues); + + Assert.DoesNotContain( + new KeyValuePair("id", "5"), + result.RouteValues); + } + + [Fact] + public async Task VersionedApi_CanNotReachOtherVersionOperations_OnTheSameController_WithNoVersionSpecified() + { + // Arrange + var message = new HttpRequestMessage(HttpMethod.Post, "http://localhost/Tickets"); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); + + var body = await response.Content.ReadAsByteArrayAsync(); + Assert.Empty(body); + } + + [Theory] + [InlineData("PUT", "Put", "2")] + [InlineData("PUT", "Put", "3")] + [InlineData("PUT", "Put", "4")] + [InlineData("DELETE", "Delete", "2")] + [InlineData("DELETE", "Delete", "3")] + [InlineData("DELETE", "Delete", "4")] + public async Task VersionedApi_CanReachOtherVersionOperationsWithParameters_OnTheSameController( + string method, + string action, + string version) + { + // Arrange + var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Tickets/5?version=" + version); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var body = await response.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(body); + + Assert.Equal("Tickets", result.Controller); + Assert.Equal(action, result.Action); + Assert.NotEmpty(result.RouteValues); + + Assert.Contains( + new KeyValuePair("id", "5"), + result.RouteValues); + } + + [Theory] + [InlineData("PUT")] + [InlineData("DELETE")] + public async Task VersionedApi_CanNotReachOtherVersionOperationsWithParameters_OnTheSameController_WithNoVersionSpecified(string method) + { + // Arrange + var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Tickets/5"); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); + + var body = await response.Content.ReadAsByteArrayAsync(); + Assert.Empty(body); + } + + [Theory] + [InlineData("3")] + [InlineData("4")] + [InlineData("5")] + public async Task VersionedApi_CanUseOrderToDisambiguate_OverlappingVersionRanges(string version) + { + // Arrange + var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Books?version=" + version); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var body = await response.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(body); + + Assert.Equal("Books", result.Controller); + Assert.Equal("GetBreakingChange", result.Action); + } + + [Theory] + [InlineData("1")] + [InlineData("2")] + [InlineData("6")] + public async Task VersionedApi_OverlappingVersionRanges_FallsBackToLowerOrderAction(string version) + { + // Arrange + var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Books?version=" + version); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var body = await response.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(body); + + Assert.Equal("Books", result.Controller); + Assert.Equal("Get", result.Action); + } + + + [Theory] + [InlineData("GET", "Get")] + [InlineData("POST", "Post")] + public async Task VersionedApi_CanReachV1Operations_OnTheOriginalController_WithNoVersionSpecified(string method, string action) + { + // Arrange + var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Movies"); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var body = await response.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(body); + + Assert.Equal("Movies", result.Controller); + Assert.Equal(action, result.Action); + } + + [Theory] + [InlineData("GET", "Get")] + [InlineData("POST", "Post")] + public async Task VersionedApi_CanReachV1Operations_OnTheOriginalController_WithVersionSpecified(string method, string action) + { + // Arrange + var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Movies?version=2"); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var body = await response.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(body); + + Assert.Equal("Movies", result.Controller); + Assert.Equal(action, result.Action); + } + + [Theory] + [InlineData("GET", "GetById")] + [InlineData("PUT", "Put")] + [InlineData("DELETE", "Delete")] + public async Task VersionedApi_CanReachV1OperationsWithParameters_OnTheOriginalController(string method, string action) + { + // Arrange + var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Movies/5"); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var body = await response.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(body); + + Assert.Equal("Movies", result.Controller); + Assert.Equal(action, result.Action); + } + + [Theory] + [InlineData("GET", "GetById")] + [InlineData("DELETE", "Delete")] + public async Task VersionedApi_CanReachV1OperationsWithParameters_OnTheOriginalController_WithVersionSpecified(string method, string action) + { + // Arrange + var message = new HttpRequestMessage(new HttpMethod(method), "http://localhost/Movies/5?version=2"); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var body = await response.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(body); + + Assert.Equal("Movies", result.Controller); + Assert.Equal(action, result.Action); + } + + [Fact] + public async Task VersionedApi_CanReachOtherVersionOperationsWithParameters_OnTheV2Controller() + { + // Arrange + var message = new HttpRequestMessage(HttpMethod.Put, "http://localhost/Movies/5?version=2"); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var body = await response.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(body); + + Assert.Equal("MoviesV2", result.Controller); + Assert.Equal("Put", result.Action); + Assert.NotEmpty(result.RouteValues); + } + + [Theory] + [InlineData("v1/Pets")] + [InlineData("v2/Pets")] + public async Task VersionedApi_CanHaveTwoRoutesWithVersionOnTheUrl_OnTheSameAction(string url) + { + // Arrange + var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/" + url); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var body = await response.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(body); + + Assert.Equal("Pets", result.Controller); + Assert.Equal("Get", result.Action); + } + + [Theory] + [InlineData("v1/Pets/5", "V1")] + [InlineData("v2/Pets/5", "V2")] + public async Task VersionedApi_CanHaveTwoRoutesWithVersionOnTheUrl_OnDifferentActions(string url, string version) + { + // Arrange + var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/" + url); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var body = await response.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(body); + + Assert.Equal("Pets", result.Controller); + Assert.Equal("Get" + version, result.Action); + } + + [Theory] + [InlineData("v1/Pets", "V1")] + [InlineData("v2/Pets", "V2")] + public async Task VersionedApi_CanHaveTwoRoutesWithVersionOnTheUrl_OnDifferentActions_WithInlineConstraint(string url, string version) + { + // Arrange + var message = new HttpRequestMessage(HttpMethod.Post, "http://localhost/" + url); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var body = await response.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(body); + + Assert.Equal("Pets", result.Controller); + Assert.Equal("Post" + version, result.Action); + } + + [Theory] + [InlineData("Customers/5", "?version=1", "Get")] + [InlineData("Customers/5", "?version=2", "Get")] + [InlineData("Customers/5", "?version=3", "GetV3ToV5")] + [InlineData("Customers/5", "?version=4", "GetV3ToV5")] + [InlineData("Customers/5", "?version=5", "GetV3ToV5")] + public async Task VersionedApi_CanProvideVersioningInformation_UsingPlainActionConstraint(string url, string query, string actionName) + { + // Arrange + var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost/" + url + query); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var body = await response.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(body); + + Assert.Equal("Customers", result.Controller); + Assert.Equal(actionName, result.Action); + } + + [Fact] + public async Task VersionedApi_ConstraintOrder_IsRespected() + { + // Arrange + var message = new HttpRequestMessage(HttpMethod.Post, "http://localhost/" + "Customers?version=2"); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var body = await response.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(body); + + Assert.Equal("Customers", result.Controller); + Assert.Equal("AnyV2OrHigher", result.Action); + } + + [Fact] + public async Task VersionedApi_CanUseConstraintOrder_ToChangeSelectedAction() + { + // Arrange + var message = new HttpRequestMessage(HttpMethod.Delete, "http://localhost/" + "Customers/5?version=2"); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var body = await response.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(body); + + Assert.Equal("Customers", result.Controller); + Assert.Equal("Delete", result.Action); + } + + [Theory] + [InlineData("1")] + [InlineData("2")] + public async Task VersionedApi_MultipleVersionsUsingAttributeRouting_OnTheSameMethod(string version) + { + // Arrange + var path = "/" + version + "/Vouchers?version=" + version; + var message = new HttpRequestMessage(HttpMethod.Get, "http://localhost" + path); + + // Act + var response = await Client.SendAsync(message); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var body = await response.Content.ReadAsStringAsync(); + var result = JsonConvert.DeserializeObject(body); + + Assert.Equal("Vouchers", result.Controller); + Assert.Equal("GetVouchersMultipleVersions", result.Action); + + var actualUrl = Assert.Single(result.ExpectedUrls); + Assert.Equal(path, actualUrl); + } + + private class RoutingResult + { + public string[] ExpectedUrls { get; set; } + + public string ActualUrl { get; set; } + + public Dictionary RouteValues { get; set; } + + public string RouteName { get; set; } + + public string Action { get; set; } + + public string Controller { get; set; } + + public string Link { get; set; } + } + } +} \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorPageActivatorTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorPageActivatorTest.cs index 17b0999b58..34a8b0926b 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorPageActivatorTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorPageActivatorTest.cs @@ -165,6 +165,69 @@ namespace Microsoft.AspNetCore.Mvc.Razor Assert.Throws(() => activator.Activate(instance, viewContext)); } + [Fact] + public void Activate_UsesModelFromModelTypeProvider() + { + // Arrange + var activator = CreateActivator(); + + var viewData = new ViewDataDictionary(MetadataProvider, new ModelStateDictionary()) + { + { "key", "value" }, + }; + var viewContext = CreateViewContext(viewData); + var page = new ModelTypeProviderRazorPage(); + + // Act + activator.Activate(page, viewContext); + + // Assert + Assert.Same(viewContext.ViewData, page.ViewData); + Assert.NotSame(viewData, viewContext.ViewData); + + Assert.IsType>(viewContext.ViewData); + Assert.Equal("value", viewContext.ViewData["key"]); + } + + [Fact] + public void GetOrAddCacheEntry_CachesPages() + { + // Arrange + var activator = CreateActivator(); + var page = new TestRazorPage(); + + // Act + var result1 = activator.GetOrAddCacheEntry(page); + var result2 = activator.GetOrAddCacheEntry(page); + + // Assert + Assert.Same(result1, result2); + } + + [Fact] + public void GetOrAddCacheEntry_VariesByModelType_IfPageIsModelTypeProvider() + { + // Arrange + var activator = CreateActivator(); + var page = new ModelTypeProviderRazorPage(); + + // Act - 1 + var result1 = activator.GetOrAddCacheEntry(page); + var result2 = activator.GetOrAddCacheEntry(page); + + // Assert - 1 + Assert.Same(result1, result2); + + // Act - 2 + page.ModelType = typeof(string); + var result3 = activator.GetOrAddCacheEntry(page); + var result4 = activator.GetOrAddCacheEntry(page); + + // Assert - 2 + Assert.Same(result3, result4); + Assert.NotSame(result1, result3); + } + private RazorPageActivator CreateActivator() { return new RazorPageActivator(MetadataProvider, UrlHelperFactory, JsonHelper, DiagnosticSource, HtmlEncoder, ModelExpressionProvider); @@ -225,6 +288,21 @@ namespace Microsoft.AspNetCore.Mvc.Razor } } + private class ModelTypeProviderRazorPage : RazorPage, IModelTypeProvider + { + [RazorInject] + public ViewDataDictionary ViewData { get; set; } + + public Type ModelType { get; set; } = typeof(Guid); + + public override Task ExecuteAsync() + { + throw new NotImplementedException(); + } + + public Type GetModelType() => ModelType; + } + private abstract class NoModelPropertyBase : RazorPage { [RazorInject] diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorViewTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorViewTest.cs index cd5e8835a2..71fa07b67e 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorViewTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.Test/RazorViewTest.cs @@ -1747,6 +1747,49 @@ namespace Microsoft.AspNetCore.Mvc.Razor Assert.Equal(expected, viewContext.Writer.ToString()); } + [Fact] + public async Task RenderAsync_InvokesOnAfterPageActivated() + { + // Arrange + var viewStart = new TestableRazorPage(_ => { }); + var page = new TestableRazorPage(p => { p.Layout = LayoutPath; }); + var layout = new TestableRazorPage(p => { p.RenderBodyPublic(); }); + var expected = new HashSet(); + var onAfterPageActivatedCalled = 0; + + var activated = new HashSet(); + var pageActivator = new Mock(); + pageActivator.Setup(p => p.Activate(It.IsAny(), It.IsAny())) + .Callback((IRazorPage p, ViewContext v) => activated.Add(p)); + + var viewEngine = new Mock(); + viewEngine.Setup(v => v.FindPage(It.IsAny(), LayoutPath)) + .Returns(new RazorPageResult(LayoutPath, layout)); + + var view = new RazorView( + viewEngine.Object, + pageActivator.Object, + new[] { viewStart }, + page, + new HtmlTestEncoder(), + new DiagnosticListener("Microsoft.AspNetCore.Mvc.Razor")) + { + OnAfterPageActivated = AssertActivated, + }; + var viewContext = CreateViewContext(view); + + // Act + await view.RenderAsync(viewContext); + Assert.Equal(3, onAfterPageActivatedCalled); + + void AssertActivated(IRazorPage p, ViewContext v) + { + onAfterPageActivatedCalled++; + expected.Add(p); + Assert.Equal(expected, activated); + } + } + private static ViewContext CreateViewContext(RazorView view) { var httpContext = new DefaultHttpContext(); diff --git a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/Rendering/TestResources.cs b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/Rendering/TestResources.cs index 5c5b711090..5f34f8406c 100644 --- a/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/Rendering/TestResources.cs +++ b/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test/Rendering/TestResources.cs @@ -1,7 +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 Microsoft.AspNetCore.Mvc.ViewFeatures.Test; +using Resources = Microsoft.AspNetCore.Mvc.ViewFeatures.Test.Resources; namespace Microsoft.AspNetCore.Mvc { diff --git a/test/WebSites/RazorPagesWebSite/Pages/ViewData/ViewDataSetInViewStart/Index.cs b/test/WebSites/RazorPagesWebSite/Pages/ViewData/ViewDataSetInViewStart/Index.cs new file mode 100644 index 0000000000..f911dbfe5e --- /dev/null +++ b/test/WebSites/RazorPagesWebSite/Pages/ViewData/ViewDataSetInViewStart/Index.cs @@ -0,0 +1,11 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace RazorPagesWebSite.ViewDataSetInViewStart +{ + public class Index : PageModel + { + [ViewData] + public string ValueFromPageModel => "Value from Page Model"; + } +} diff --git a/test/WebSites/RazorPagesWebSite/Pages/ViewData/ViewDataSetInViewStart/Index.cshtml b/test/WebSites/RazorPagesWebSite/Pages/ViewData/ViewDataSetInViewStart/Index.cshtml new file mode 100644 index 0000000000..683a1631e8 --- /dev/null +++ b/test/WebSites/RazorPagesWebSite/Pages/ViewData/ViewDataSetInViewStart/Index.cshtml @@ -0,0 +1,7 @@ +@page +@namespace RazorPagesWebSite.ViewDataSetInViewStart +@model Index +@{ + ViewData["ValueFromPage"] = "Value from Page"; +} +Sample that shows ViewData attributes being set in a PageModel. diff --git a/test/WebSites/RazorPagesWebSite/Pages/ViewData/ViewDataSetInViewStart/_Layout.cshtml b/test/WebSites/RazorPagesWebSite/Pages/ViewData/ViewDataSetInViewStart/_Layout.cshtml new file mode 100644 index 0000000000..6b3bb02e51 --- /dev/null +++ b/test/WebSites/RazorPagesWebSite/Pages/ViewData/ViewDataSetInViewStart/_Layout.cshtml @@ -0,0 +1,4 @@ +@RenderBody() +@ViewData["ValueFromViewStart"] +@ViewData["ValueFromPage"] +@ViewData["ValueFromPageModel"] diff --git a/test/WebSites/RazorPagesWebSite/Pages/ViewData/ViewDataSetInViewStart/_ViewStart.cshtml b/test/WebSites/RazorPagesWebSite/Pages/ViewData/ViewDataSetInViewStart/_ViewStart.cshtml new file mode 100644 index 0000000000..51245c5fa0 --- /dev/null +++ b/test/WebSites/RazorPagesWebSite/Pages/ViewData/ViewDataSetInViewStart/_ViewStart.cshtml @@ -0,0 +1,4 @@ +@{ + Layout = "_Layout"; + ViewData["ValueFromViewStart"] = "Value from _ViewStart"; +} \ No newline at end of file diff --git a/test/WebSites/VersioningWebSite/Program.cs b/test/WebSites/VersioningWebSite/Program.cs new file mode 100644 index 0000000000..7dce10d19d --- /dev/null +++ b/test/WebSites/VersioningWebSite/Program.cs @@ -0,0 +1,26 @@ +// 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.IO; +using Microsoft.AspNetCore.Hosting; + +namespace VersioningWebSite +{ + public class Program + { + public static void Main(string[] args) + { + var host = CreateWebHostBuilder(args) + .Build(); + + host.Run(); + } + + public static IWebHostBuilder CreateWebHostBuilder(string[] args) => + new WebHostBuilder() + .UseContentRoot(Directory.GetCurrentDirectory()) + .UseStartup() + .UseKestrel() + .UseIISIntegration(); + } +} diff --git a/test/WebSites/VersioningWebSite/Startup.cs b/test/WebSites/VersioningWebSite/Startup.cs index cdf090a0a6..5373436c06 100644 --- a/test/WebSites/VersioningWebSite/Startup.cs +++ b/test/WebSites/VersioningWebSite/Startup.cs @@ -24,21 +24,5 @@ namespace VersioningWebSite { app.UseMvcWithDefaultRoute(); } - - public static void Main(string[] args) - { - var host = CreateWebHostBuilder(args) - .Build(); - - host.Run(); - } - - public static IWebHostBuilder CreateWebHostBuilder(string[] args) => - new WebHostBuilder() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseStartup() - .UseKestrel() - .UseIISIntegration(); } -} - +} \ No newline at end of file diff --git a/test/WebSites/VersioningWebSite/StartupWithDispatching.cs b/test/WebSites/VersioningWebSite/StartupWithDispatching.cs new file mode 100644 index 0000000000..164f86550b --- /dev/null +++ b/test/WebSites/VersioningWebSite/StartupWithDispatching.cs @@ -0,0 +1,37 @@ +// 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.IO; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Mvc.Infrastructure; +using Microsoft.Extensions.DependencyInjection; + +namespace VersioningWebSite +{ + public class StartupWithDispatching + { + public void ConfigureServices(IServiceCollection services) + { + services.AddDispatcher(); + + // Add MVC services to the services container + services.AddMvc(); + + services.AddScoped(); + services.AddSingleton(); + } + + public void Configure(IApplicationBuilder app) + { + app.UseDispatcher(); + + app.UseMvcWithEndpoint(endpoints => + { + endpoints.MapEndpoint( + name: "default", + template: "{controller=Home}/{action=Index}/{id?}"); + }); + } + } +} \ No newline at end of file diff --git a/test/WebSites/VersioningWebSite/VersionAttribute.cs b/test/WebSites/VersioningWebSite/VersionAttribute.cs index e1658fd8b6..827aaef23c 100644 --- a/test/WebSites/VersioningWebSite/VersionAttribute.cs +++ b/test/WebSites/VersioningWebSite/VersionAttribute.cs @@ -3,10 +3,11 @@ using System; using Microsoft.AspNetCore.Mvc.ActionConstraints; +using Microsoft.AspNetCore.Routing.EndpointConstraints; namespace VersioningWebSite { - public class VersionAttribute : Attribute, IActionConstraintFactory + public class VersionAttribute : Attribute, IActionConstraintFactory, IEndpointConstraintFactory { private int? _maxVersion; private int? _minVersion; @@ -32,7 +33,12 @@ namespace VersioningWebSite public bool IsReusable => true; - public IActionConstraint CreateInstance(IServiceProvider services) + IActionConstraint IActionConstraintFactory.CreateInstance(IServiceProvider services) + { + return new VersionRangeValidator(_minVersion, _maxVersion) { Order = _order ?? 0 }; + } + + IEndpointConstraint IEndpointConstraintFactory.CreateInstance(IServiceProvider services) { return new VersionRangeValidator(_minVersion, _maxVersion) { Order = _order ?? 0 }; } diff --git a/test/WebSites/VersioningWebSite/VersionDeleteAttribute.cs b/test/WebSites/VersioningWebSite/VersionDeleteAttribute.cs index 822e281547..9354c56b23 100644 --- a/test/WebSites/VersioningWebSite/VersionDeleteAttribute.cs +++ b/test/WebSites/VersioningWebSite/VersionDeleteAttribute.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Mvc.Routing; namespace VersioningWebSite { - public class VersionDeleteAttribute : VersionRoute, IActionHttpMethodProvider + public class VersionDeleteAttribute : VersionRouteAttribute, IActionHttpMethodProvider { public VersionDeleteAttribute(string template) : base(template) diff --git a/test/WebSites/VersioningWebSite/VersionGetAttribute.cs b/test/WebSites/VersioningWebSite/VersionGetAttribute.cs index 4e53537130..b809c585f9 100644 --- a/test/WebSites/VersioningWebSite/VersionGetAttribute.cs +++ b/test/WebSites/VersioningWebSite/VersionGetAttribute.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Mvc.Routing; namespace VersioningWebSite { - public class VersionGetAttribute : VersionRoute, IActionHttpMethodProvider + public class VersionGetAttribute : VersionRouteAttribute, IActionHttpMethodProvider { public VersionGetAttribute(string template) : base(template) diff --git a/test/WebSites/VersioningWebSite/VersionPostAttribute.cs b/test/WebSites/VersioningWebSite/VersionPostAttribute.cs index 18db5eb210..9738cd946d 100644 --- a/test/WebSites/VersioningWebSite/VersionPostAttribute.cs +++ b/test/WebSites/VersioningWebSite/VersionPostAttribute.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Mvc.Routing; namespace VersioningWebSite { - public class VersionPostAttribute : VersionRoute, IActionHttpMethodProvider + public class VersionPostAttribute : VersionRouteAttribute, IActionHttpMethodProvider { public VersionPostAttribute(string template) : base(template) diff --git a/test/WebSites/VersioningWebSite/VersionPutAttribute.cs b/test/WebSites/VersioningWebSite/VersionPutAttribute.cs index 49d4dab380..ad1dafc176 100644 --- a/test/WebSites/VersioningWebSite/VersionPutAttribute.cs +++ b/test/WebSites/VersioningWebSite/VersionPutAttribute.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Mvc.Routing; namespace VersioningWebSite { - public class VersionPutAttribute : VersionRoute, IActionHttpMethodProvider + public class VersionPutAttribute : VersionRouteAttribute, IActionHttpMethodProvider { public VersionPutAttribute(string template) : base(template) diff --git a/test/WebSites/VersioningWebSite/VersionRangeValidator.cs b/test/WebSites/VersioningWebSite/VersionRangeValidator.cs index 14c8d37662..ec8d244de3 100644 --- a/test/WebSites/VersioningWebSite/VersionRangeValidator.cs +++ b/test/WebSites/VersioningWebSite/VersionRangeValidator.cs @@ -3,10 +3,11 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.ActionConstraints; +using Microsoft.AspNetCore.Routing.EndpointConstraints; namespace VersioningWebSite { - public class VersionRangeValidator : IActionConstraint + public class VersionRangeValidator : IActionConstraint, IEndpointConstraint { private readonly int? _minVersion; private readonly int? _maxVersion; @@ -25,9 +26,19 @@ namespace VersioningWebSite } public bool Accept(ActionConstraintContext context) + { + return ProcessRequest(context.RouteContext.HttpContext.Request); + } + + public bool Accept(EndpointConstraintContext context) + { + return ProcessRequest(context.HttpContext.Request); + } + + private bool ProcessRequest(HttpRequest request) { int version; - if (int.TryParse(GetVersion(context.RouteContext.HttpContext.Request), out version)) + if (int.TryParse(GetVersion(request), out version)) { return (_minVersion == null || _minVersion <= version) && (_maxVersion == null || _maxVersion >= version); diff --git a/test/WebSites/VersioningWebSite/VersionRoute.cs b/test/WebSites/VersioningWebSite/VersionRouteAttribute.cs similarity index 84% rename from test/WebSites/VersioningWebSite/VersionRoute.cs rename to test/WebSites/VersioningWebSite/VersionRouteAttribute.cs index 3b6f61c429..288a488790 100644 --- a/test/WebSites/VersioningWebSite/VersionRoute.cs +++ b/test/WebSites/VersioningWebSite/VersionRouteAttribute.cs @@ -5,12 +5,13 @@ using System; using System.Text.RegularExpressions; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.ActionConstraints; +using Microsoft.AspNetCore.Routing.EndpointConstraints; namespace VersioningWebSite { - public class VersionRoute : RouteAttribute, IActionConstraintFactory + public class VersionRouteAttribute : RouteAttribute, IActionConstraintFactory, IEndpointConstraintFactory { - private readonly IActionConstraint _constraint; + private readonly IActionConstraint _actionConstraint; // 5 // [5] @@ -28,12 +29,12 @@ namespace VersioningWebSite public bool IsReusable => true; - public VersionRoute(string template) + public VersionRouteAttribute(string template) : base(template) { } - public VersionRoute(string template, string versionRange) + public VersionRouteAttribute(string template, string versionRange) : base(template) { var constraint = CreateVersionConstraint(versionRange); @@ -44,7 +45,7 @@ namespace VersioningWebSite throw new ArgumentException(message, "versionRange"); } - _constraint = constraint; + _actionConstraint = constraint; } private static IActionConstraint CreateVersionConstraint(string versionRange) @@ -122,9 +123,14 @@ namespace VersioningWebSite } } - public IActionConstraint CreateInstance(IServiceProvider services) + IActionConstraint IActionConstraintFactory.CreateInstance(IServiceProvider services) { - return _constraint; + return _actionConstraint; + } + + IEndpointConstraint IEndpointConstraintFactory.CreateInstance(IServiceProvider services) + { + return (IEndpointConstraint)_actionConstraint; } } } \ No newline at end of file From b0e46dc31275bf9ae86f85dd3f65d0acade0af17 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Tue, 17 Jul 2018 12:26:45 -0700 Subject: [PATCH 10/41] Temporarily reference feature branch versions of ROuting & Localization to prevent breaking changes --- build/dependencies.props | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index ef71e047e1..26347db36c 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -39,7 +39,7 @@ 3.0.0-alpha1-10081 3.0.0-alpha1-10081 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 + 3.0.0-a-alpha1-linkgenerator-changes-16723 3.0.0-alpha1-10081 3.0.0-alpha1-10081 3.0.0-alpha1-10081 @@ -48,8 +48,8 @@ 3.0.0-alpha1-10081 3.0.0-alpha1-10081 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 + 3.0.0-a-alpha1-linkgeneration-changes-16746 + 3.0.0-a-alpha1-linkgeneration-changes-16746 3.0.0-alpha1-10081 3.0.0-alpha1-10081 3.0.0-alpha1-10081 From 62e000401d84ab0a20d4d6612770f342c94ed99d Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Wed, 18 Jul 2018 08:56:44 -0700 Subject: [PATCH 11/41] Updated dependencies.props --- build/dependencies.props | 144 +++++++++++++++++++-------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 26347db36c..1718b94374 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -16,87 +16,87 @@ 0.42.1 2.1.0 2.1.0-rc1-final - 3.0.0-alpha1-10081 + 3.0.0-alpha1-10099 3.0.0-alpha1-10009 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-a-alpha1-linkgenerator-changes-16723 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-a-alpha1-linkgeneration-changes-16746 - 3.0.0-a-alpha1-linkgeneration-changes-16746 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 5.2.6 2.8.0 2.8.0 - 3.0.0-alpha1-10081 + 3.0.0-alpha1-10099 1.7.0 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 3.0.0-preview1-26710-03 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 2.0.9 2.1.2 2.2.0-preview1-26618-02 - 3.0.0-alpha1-10081 - 3.0.0-alpha1-10081 + 3.0.0-alpha1-10099 + 3.0.0-alpha1-10099 15.6.1 4.7.49 2.0.3 From 817053427522d9cbb2cd8528db29fb1e4c795bf1 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 22 Jul 2018 13:07:51 -0700 Subject: [PATCH 12/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 146 +++++++++++++++++++-------------------- korebuild-lock.txt | 4 +- 2 files changed, 75 insertions(+), 75 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 18cd03713f..3380a869fe 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -16,87 +16,87 @@ 0.42.1 2.1.0 2.1.0-rc1-final - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10009 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-a-alpha1-master-route-pattern-16760 - 3.0.0-a-alpha1-master-route-pattern-16760 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10011 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 5.2.6 2.8.0 2.8.0 - 3.0.0-alpha1-10099 + 3.0.0-alpha1-10123 1.7.0 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 3.0.0-preview1-26710-03 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 2.0.9 2.1.2 2.2.0-preview1-26618-02 - 3.0.0-alpha1-10099 - 3.0.0-alpha1-10099 + 3.0.0-alpha1-10123 + 3.0.0-alpha1-10123 15.6.1 4.7.49 2.0.3 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 4db537685b..9a67ee9c28 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:3.0.0-alpha1-10009 -commithash:86be4707e47d2f1930a982f2b59eacfc4196da33 +version:3.0.0-alpha1-10011 +commithash:717c2eb1f91dafd2580c1a9b8e5064d12dd8c054 From 83d3ddb68676219a404ba4c447e9f88ce0802937 Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Mon, 23 Jul 2018 08:06:05 -0700 Subject: [PATCH 13/41] update deps --- build/dependencies.props | 144 +++++++++++++++++++-------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 3380a869fe..91d5a3198a 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -16,87 +16,87 @@ 0.42.1 2.1.0 2.1.0-rc1-final - 3.0.0-alpha1-10123 + 3.0.0-alpha1-10125 3.0.0-alpha1-10011 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 5.2.6 2.8.0 2.8.0 - 3.0.0-alpha1-10123 + 3.0.0-alpha1-10125 1.7.0 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 3.0.0-preview1-26710-03 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 2.0.9 2.1.2 2.2.0-preview1-26618-02 - 3.0.0-alpha1-10123 - 3.0.0-alpha1-10123 + 3.0.0-alpha1-10125 + 3.0.0-alpha1-10125 15.6.1 4.7.49 2.0.3 From 1b40c4388e4f2cc5d934108afd475a810e2c9538 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Tue, 24 Jul 2018 10:12:41 -0700 Subject: [PATCH 14/41] Use routing feature branch versions --- build/dependencies.props | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 91d5a3198a..4883fca8e0 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -39,7 +39,7 @@ 3.0.0-alpha1-10125 3.0.0-alpha1-10125 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 + 3.0.0-a-alpha1-lgcontext-changes-16728 3.0.0-alpha1-10125 3.0.0-alpha1-10125 3.0.0-alpha1-10125 @@ -48,8 +48,8 @@ 3.0.0-alpha1-10125 3.0.0-alpha1-10125 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 + 3.0.0-a-alpha1-lgcontext-changes-16778 + 3.0.0-a-alpha1-lgcontext-changes-16778 3.0.0-alpha1-10125 3.0.0-alpha1-10125 3.0.0-alpha1-10125 From bf50387092eeb3d581713ca7335d98f9166b5fde Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Wed, 25 Jul 2018 06:31:58 -0700 Subject: [PATCH 15/41] Upgraded dependencies.props --- build/dependencies.props | 152 +++++++++++++++++++-------------------- 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 4883fca8e0..e3d66ca453 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -16,94 +16,94 @@ 0.42.1 2.1.0 2.1.0-rc1-final - 3.0.0-alpha1-10125 + 3.0.0-alpha1-10143 3.0.0-alpha1-10011 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-a-alpha1-lgcontext-changes-16728 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-a-alpha1-lgcontext-changes-16778 - 3.0.0-a-alpha1-lgcontext-changes-16778 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 5.2.6 2.8.0 2.8.0 - 3.0.0-alpha1-10125 + 3.0.0-alpha1-10143 1.7.0 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-preview1-26710-03 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-preview1-26724-02 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 2.0.9 2.1.2 2.2.0-preview1-26618-02 - 3.0.0-alpha1-10125 - 3.0.0-alpha1-10125 + 3.0.0-alpha1-10143 + 3.0.0-alpha1-10143 15.6.1 4.7.49 2.0.3 1.0.1 - 4.6.0-preview1-26708-04 - 4.6.0-preview1-26708-04 - 4.6.0-preview1-26708-04 + 4.6.0-preview1-26724-01 + 4.6.0-preview1-26724-01 + 4.6.0-preview1-26724-01 0.9.0 2.3.1 2.4.0-rc.1.build4038 From 5628b5c496de0e57e5cb65ac709a88aedc2a214d Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Wed, 25 Jul 2018 07:12:10 -0700 Subject: [PATCH 16/41] Use feature branch versions of routing --- build/dependencies.props | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index e3d66ca453..f4317106e2 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -39,7 +39,7 @@ 3.0.0-alpha1-10143 3.0.0-alpha1-10143 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 + 3.0.0-a-alpha1-master-changes-16732 3.0.0-alpha1-10143 3.0.0-alpha1-10143 3.0.0-alpha1-10143 @@ -48,8 +48,8 @@ 3.0.0-alpha1-10143 3.0.0-alpha1-10143 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 + 3.0.0-a-alpha1-master-changes-16793 + 3.0.0-a-alpha1-master-changes-16793 3.0.0-alpha1-10143 3.0.0-alpha1-10143 3.0.0-alpha1-10143 From f06810f7445059bef442c84254b78d0ed0030152 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Wed, 25 Jul 2018 11:50:23 -0700 Subject: [PATCH 17/41] Updated dependencies.props --- build/dependencies.props | 144 +++++++++++++++++++-------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index f4317106e2..1ada6081e2 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -16,87 +16,87 @@ 0.42.1 2.1.0 2.1.0-rc1-final - 3.0.0-alpha1-10143 + 3.0.0-alpha1-10146 3.0.0-alpha1-10011 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-a-alpha1-master-changes-16732 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-a-alpha1-master-changes-16793 - 3.0.0-a-alpha1-master-changes-16793 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 5.2.6 2.8.0 2.8.0 - 3.0.0-alpha1-10143 + 3.0.0-alpha1-10146 1.7.0 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 3.0.0-preview1-26724-02 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 2.0.9 2.1.2 2.2.0-preview1-26618-02 - 3.0.0-alpha1-10143 - 3.0.0-alpha1-10143 + 3.0.0-alpha1-10146 + 3.0.0-alpha1-10146 15.6.1 4.7.49 2.0.3 From 913e28a92a51ad5aee53451947a03b267d972b4c Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 29 Jul 2018 20:04:25 +0000 Subject: [PATCH 18/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 159 ++++++++++++++++++++------------------- korebuild-lock.txt | 4 +- 2 files changed, 82 insertions(+), 81 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index cd3ad2ce1b..6538caa537 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -16,97 +16,98 @@ 0.42.1 2.1.0 2.1.0-rc1-final - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10011 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-a-alpha1-master-action-constraints-come-home-16807 - 3.0.0-a-alpha1-master-action-constraints-come-home-16807 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10015 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 5.2.6 2.8.0 2.8.0 - 3.0.0-alpha1-10146 + 3.0.0-alpha1-10173 1.7.0 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-preview1-26724-02 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-preview1-26727-03 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 2.0.9 2.1.2 2.2.0-preview1-26618-02 - 3.0.0-alpha1-10146 - 3.0.0-alpha1-10146 + 3.0.0-alpha1-10173 + 3.0.0-alpha1-10173 15.6.1 4.7.49 2.0.3 1.0.1 - 4.6.0-preview1-26724-01 - 4.6.0-preview1-26724-01 - 4.6.0-preview1-26724-01 - 0.9.0 + 4.6.0-preview1-26727-04 + 4.6.0-preview1-26727-04 + 4.6.0-preview1-26727-04 + 0.10.0 2.3.1 - 2.4.0-rc.1.build4038 + 2.4.0 + diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 9a67ee9c28..1e75dc3a23 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:3.0.0-alpha1-10011 -commithash:717c2eb1f91dafd2580c1a9b8e5064d12dd8c054 +version:3.0.0-alpha1-10015 +commithash:3f36e5c2f061712f76f2766c435d2555681d5c55 From 4a7cd6e3e58f7561f5916a3b9ee58620399a89c2 Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Wed, 1 Aug 2018 12:51:09 -0700 Subject: [PATCH 19/41] Use OSS package versions consistent with aspnet/benchmarks and Microsoft.AspNetcore.All 2.1.2 (#8190) - update our own NuGet packages to align lower-level dependencies - add metadata to BasicApi controllers - avoids analyzer failures when building with Microsoft.AspNetCore.All e.g. in benchmark runs - especially important in `PetController` because it's associated with `[ApiContoller]` - use pooled `DbContext`s for MySql too --- .../BasicApi/Controllers/PetController.cs | 17 +++++++++++++++++ .../BasicApi/Controllers/TokenController.cs | 5 ++++- benchmarkapps/BasicApi/Startup.cs | 2 +- benchmarkapps/BasicViews/Startup.cs | 2 +- build/dependencies.props | 14 +++++++------- 5 files changed, 30 insertions(+), 10 deletions(-) diff --git a/benchmarkapps/BasicApi/Controllers/PetController.cs b/benchmarkapps/BasicApi/Controllers/PetController.cs index 828b445899..8a30fb18c2 100644 --- a/benchmarkapps/BasicApi/Controllers/PetController.cs +++ b/benchmarkapps/BasicApi/Controllers/PetController.cs @@ -25,6 +25,9 @@ namespace BasicApi.Controllers public BasicApiContext DbContext { get; } [HttpGet("{id}", Name = "FindPetById")] + [ProducesResponseType(typeof(Pet), StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status401Unauthorized)] + [ProducesResponseType(StatusCodes.Status404NotFound)] public async Task> FindById(int id) { var pet = await DbContext.Pets @@ -42,6 +45,8 @@ namespace BasicApi.Controllers [AllowAnonymous] [HttpGet("anonymous/{id}")] + [ProducesResponseType(typeof(Pet), StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status404NotFound)] public async Task> FindByIdWithoutToken(int id) { var pet = await DbContext.Pets @@ -58,6 +63,9 @@ namespace BasicApi.Controllers } [HttpGet("findByCategory/{categoryId}")] + [ProducesResponseType(typeof(Pet), StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status401Unauthorized)] + [ProducesResponseType(StatusCodes.Status404NotFound)] public async Task> FindByCategory(int categoryId) { var pet = await DbContext.Pets @@ -74,6 +82,9 @@ namespace BasicApi.Controllers } [HttpGet("findByStatus")] + [ProducesResponseType(typeof(Pet), StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status401Unauthorized)] + [ProducesResponseType(StatusCodes.Status404NotFound)] public async Task> FindByStatus(string status) { var pet = await DbContext.Pets @@ -90,6 +101,9 @@ namespace BasicApi.Controllers } [HttpGet("findByTags")] + [ProducesResponseType(typeof(Pet), StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status401Unauthorized)] + [ProducesResponseType(StatusCodes.Status404NotFound)] public async Task> FindByTags(string[] tags) { var pet = await DbContext.Pets @@ -107,6 +121,9 @@ namespace BasicApi.Controllers [Authorize("pet-store-writer")] [HttpPost] + [ProducesResponseType(StatusCodes.Status201Created)] + [ProducesResponseType(StatusCodes.Status401Unauthorized)] + [ProducesResponseType(StatusCodes.Status403Forbidden)] public async Task AddPet([FromBody] Pet pet) { DbContext.Pets.Add(pet); diff --git a/benchmarkapps/BasicApi/Controllers/TokenController.cs b/benchmarkapps/BasicApi/Controllers/TokenController.cs index 624288ddd7..803a1d208e 100644 --- a/benchmarkapps/BasicApi/Controllers/TokenController.cs +++ b/benchmarkapps/BasicApi/Controllers/TokenController.cs @@ -7,6 +7,7 @@ using System.IdentityModel.Tokens.Jwt; using System.Linq; using System.Security.Claims; using Microsoft.AspNetCore.Authentication.JwtBearer; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; using Microsoft.IdentityModel.Tokens; @@ -45,11 +46,13 @@ namespace BasicApi.Controllers } [HttpGet("/token")] + [ProducesResponseType(StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status403Forbidden)] public IActionResult GetToken(string username) { if (username == null || !_identities.TryGetValue(username, out var identity)) { - return new StatusCodeResult(403); + return new StatusCodeResult(StatusCodes.Status403Forbidden); } var handler = _options.SecurityTokenValidators.OfType().First(); diff --git a/benchmarkapps/BasicApi/Startup.cs b/benchmarkapps/BasicApi/Startup.cs index 8fcc4787ae..52fa10105a 100644 --- a/benchmarkapps/BasicApi/Startup.cs +++ b/benchmarkapps/BasicApi/Startup.cs @@ -68,7 +68,7 @@ namespace BasicApi case "MYSQL": services .AddEntityFrameworkMySql() - .AddDbContext(options => options.UseMySql(connectionString)); + .AddDbContextPool(options => options.UseMySql(connectionString)); break; #endif diff --git a/benchmarkapps/BasicViews/Startup.cs b/benchmarkapps/BasicViews/Startup.cs index 30ebb341bd..8d24470a28 100644 --- a/benchmarkapps/BasicViews/Startup.cs +++ b/benchmarkapps/BasicViews/Startup.cs @@ -49,7 +49,7 @@ namespace BasicViews case "MYSQL": services .AddEntityFrameworkMySql() - .AddDbContext(options => options.UseMySql(connectionString)); + .AddDbContextPool(options => options.UseMySql(connectionString)); break; #endif diff --git a/build/dependencies.props b/build/dependencies.props index 6538caa537..05e2bf1db4 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -7,15 +7,15 @@ is not otherwise referenced. They avoid unnecessary changes to the Universe build graph or to product dependencies. Do not use these properties elsewhere. --> - + 0.9.9 0.10.13 - 2.1.0 - 2.1.0 - 2.1.0 - 0.42.1 - 2.1.0 - 2.1.0-rc1-final + 2.1.1 + 2.1.1 + 2.1.1 + 0.43.0 + 2.1.1.1 + 2.1.1 3.0.0-alpha1-10173 3.0.0-alpha1-10015 3.0.0-alpha1-10173 From 3b6da530b39f46e887dbedc5d66f2bc7af428ad3 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Thu, 2 Aug 2018 14:30:23 +1200 Subject: [PATCH 20/41] Update deps --- build/dependencies.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 05e2bf1db4..f40cf09a25 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -48,8 +48,8 @@ 3.0.0-alpha1-10173 3.0.0-alpha1-10173 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 + 3.0.0-a-alpha1-master-routing-api-review-p1-16824 + 3.0.0-a-alpha1-master-routing-api-review-p1-16824 3.0.0-alpha1-10173 3.0.0-alpha1-10173 3.0.0-alpha1-10173 From 218bf4aaef3867067dc01732951faefc5b64a3e4 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 5 Aug 2018 19:59:07 +0000 Subject: [PATCH 21/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 150 +++++++++++++++++++-------------------- korebuild-lock.txt | 4 +- 2 files changed, 77 insertions(+), 77 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index f40cf09a25..c447b9c3b4 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -7,7 +7,7 @@ is not otherwise referenced. They avoid unnecessary changes to the Universe build graph or to product dependencies. Do not use these properties elsewhere. --> - + 0.9.9 0.10.13 2.1.1 @@ -16,87 +16,87 @@ 0.43.0 2.1.1.1 2.1.1 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10015 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-a-alpha1-master-routing-api-review-p1-16824 - 3.0.0-a-alpha1-master-routing-api-review-p1-16824 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-20180731.2 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 5.2.6 2.8.0 2.8.0 - 3.0.0-alpha1-10173 + 3.0.0-alpha1-10221 1.7.0 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-preview1-26727-03 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-preview1-26731-01 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 2.0.9 2.1.2 2.2.0-preview1-26618-02 - 3.0.0-alpha1-10173 - 3.0.0-alpha1-10173 + 3.0.0-alpha1-10221 + 3.0.0-alpha1-10221 15.6.1 4.7.49 2.0.3 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 1e75dc3a23..8f9f6066ef 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:3.0.0-alpha1-10015 -commithash:3f36e5c2f061712f76f2766c435d2555681d5c55 +version:3.0.0-alpha1-20180731.2 +commithash:1179f1083695ac9213c8a70a4d1d6c45a52caf41 From cf3fcc5278ccf5e50a7414940d7d69275238118b Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Mon, 6 Aug 2018 10:37:45 -0700 Subject: [PATCH 22/41] Updated to use Routing feature branch versions --- build/dependencies.props | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index c447b9c3b4..e76a8423d3 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -39,7 +39,7 @@ 3.0.0-alpha1-10221 3.0.0-alpha1-10221 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 + 3.0.0-a-alpha1-master-lg-changes-16739 3.0.0-alpha1-10221 3.0.0-alpha1-10221 3.0.0-alpha1-10221 @@ -48,8 +48,8 @@ 3.0.0-alpha1-10221 3.0.0-alpha1-10221 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 + 3.0.0-a-alpha1-lg-changes-16852 + 3.0.0-a-alpha1-lg-changes-16852 3.0.0-alpha1-10221 3.0.0-alpha1-10221 3.0.0-alpha1-10221 From 48d1680846301f431078725c515514c10cae5a78 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Tue, 7 Aug 2018 11:06:38 -0700 Subject: [PATCH 23/41] upgraded dependencies --- build/dependencies.props | 144 +++++++++++++++++++-------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index e76a8423d3..ffac79d91b 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -16,87 +16,87 @@ 0.43.0 2.1.1.1 2.1.1 - 3.0.0-alpha1-10221 + 3.0.0-alpha1-10223 3.0.0-alpha1-20180731.2 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-a-alpha1-master-lg-changes-16739 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-a-alpha1-lg-changes-16852 - 3.0.0-a-alpha1-lg-changes-16852 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 5.2.6 2.8.0 2.8.0 - 3.0.0-alpha1-10221 + 3.0.0-alpha1-10223 1.7.0 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 3.0.0-preview1-26731-01 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 2.0.9 2.1.2 2.2.0-preview1-26618-02 - 3.0.0-alpha1-10221 - 3.0.0-alpha1-10221 + 3.0.0-alpha1-10223 + 3.0.0-alpha1-10223 15.6.1 4.7.49 2.0.3 From 306c399310cf8817bbe56456d8c1184a00a67cd3 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Tue, 7 Aug 2018 11:07:57 -0700 Subject: [PATCH 24/41] Using Routing feature branch versions --- build/dependencies.props | 4 ++-- .../Builder/MvcApplicationBuilderExtensions.cs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index ffac79d91b..d38c6123c4 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -48,8 +48,8 @@ 3.0.0-alpha1-10223 3.0.0-alpha1-10223 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 + 3.0.0-a-alpha1-remove-useglobalrouting-16859 + 3.0.0-a-alpha1-remove-useglobalrouting-16859 3.0.0-alpha1-10223 3.0.0-alpha1-10223 3.0.0-alpha1-10223 diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Builder/MvcApplicationBuilderExtensions.cs b/src/Microsoft.AspNetCore.Mvc.Core/Builder/MvcApplicationBuilderExtensions.cs index 08baf62c2e..c54fcb350a 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Builder/MvcApplicationBuilderExtensions.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Builder/MvcApplicationBuilderExtensions.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Microsoft.AspNetCore.Internal; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Core; using Microsoft.AspNetCore.Mvc.Internal; @@ -125,7 +126,7 @@ namespace Microsoft.AspNetCore.Builder { // Matching middleware has not been registered yet // For back-compat register middleware so an endpoint is matched and then immediately used - app.UseGlobalRouting(); + app.UseEndpointRouting(); } return app.UseEndpoint(); From 6bd94095f7e64b77bf0a54d158a99b3441902c02 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 12 Aug 2018 20:08:50 +0000 Subject: [PATCH 25/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 154 +++++++++++++++++++-------------------- korebuild-lock.txt | 4 +- 2 files changed, 79 insertions(+), 79 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index d38c6123c4..580da71c93 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -16,94 +16,94 @@ 0.43.0 2.1.1.1 2.1.1 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-20180731.2 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-a-alpha1-remove-useglobalrouting-16859 - 3.0.0-a-alpha1-remove-useglobalrouting-16859 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-20180810.1 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 5.2.6 2.8.0 2.8.0 - 3.0.0-alpha1-10223 + 3.0.0-alpha1-10275 1.7.0 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-preview1-26731-01 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-preview1-26810-02 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 2.0.9 2.1.2 2.2.0-preview1-26618-02 - 3.0.0-alpha1-10223 - 3.0.0-alpha1-10223 + 3.0.0-alpha1-10275 + 3.0.0-alpha1-10275 15.6.1 4.7.49 2.0.3 1.0.1 - 4.6.0-preview1-26727-04 - 4.6.0-preview1-26727-04 - 4.6.0-preview1-26727-04 + 4.6.0-preview1-26807-04 + 4.6.0-preview1-26807-04 + 4.6.0-preview1-26807-04 0.10.0 2.3.1 2.4.0 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 8f9f6066ef..e417a01b52 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:3.0.0-alpha1-20180731.2 -commithash:1179f1083695ac9213c8a70a4d1d6c45a52caf41 +version:3.0.0-alpha1-20180810.1 +commithash:45c32b4f020e14a9295be31866051a18d293309d From c1fc38a3e89abca3129d42cf8145540898cc25dc Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 19 Aug 2018 19:23:35 +0000 Subject: [PATCH 26/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 154 +++++++++++++++++++-------------------- korebuild-lock.txt | 4 +- 2 files changed, 79 insertions(+), 79 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 580da71c93..4c17ff9020 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -16,94 +16,94 @@ 0.43.0 2.1.1.1 2.1.1 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-20180810.1 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-20180817.3 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 5.2.6 2.8.0 2.8.0 - 3.0.0-alpha1-10275 + 3.0.0-alpha1-10321 1.7.0 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-preview1-26810-02 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-preview1-26817-04 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 2.0.9 2.1.2 2.2.0-preview1-26618-02 - 3.0.0-alpha1-10275 - 3.0.0-alpha1-10275 + 3.0.0-alpha1-10321 + 3.0.0-alpha1-10321 15.6.1 4.7.49 2.0.3 1.0.1 - 4.6.0-preview1-26807-04 - 4.6.0-preview1-26807-04 - 4.6.0-preview1-26807-04 + 4.6.0-preview1-26816-01 + 4.6.0-preview1-26816-01 + 4.6.0-preview1-26816-01 0.10.0 2.3.1 2.4.0 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index e417a01b52..e5330b3d33 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:3.0.0-alpha1-20180810.1 -commithash:45c32b4f020e14a9295be31866051a18d293309d +version:3.0.0-alpha1-20180817.3 +commithash:134cdbee9bee29dd3ccb654c67663b27b9ffa6c8 From a40ceec73c8c49eaad041d96699d527f863e4633 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 26 Aug 2018 19:23:17 +0000 Subject: [PATCH 27/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 156 +++++++++++++++++++-------------------- korebuild-lock.txt | 4 +- 2 files changed, 80 insertions(+), 80 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 3bfa4b2d35..214224647a 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -7,7 +7,7 @@ is not otherwise referenced. They avoid unnecessary changes to the Universe build graph or to product dependencies. Do not use these properties elsewhere. --> - + 0.9.9 0.10.13 2.1.1 @@ -16,94 +16,94 @@ 0.43.0 2.1.1.1 2.1.1 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-20180817.3 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-a-alpha1-react-endpointselector-16903 - 3.0.0-a-alpha1-react-endpointselector-16903 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-20180821.3 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 5.2.6 2.8.0 2.8.0 - 3.0.0-alpha1-10321 + 3.0.0-alpha1-10352 1.7.0 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-preview1-26817-04 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-preview1-26821-04 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 2.0.9 2.1.2 2.2.0-preview1-26618-02 - 3.0.0-alpha1-10321 - 3.0.0-alpha1-10321 + 3.0.0-alpha1-10352 + 3.0.0-alpha1-10352 15.6.1 4.7.49 2.0.3 1.0.1 - 4.6.0-preview1-26816-01 - 4.6.0-preview1-26816-01 - 4.6.0-preview1-26816-01 + 4.6.0-preview1-26817-04 + 4.6.0-preview1-26817-04 + 4.6.0-preview1-26817-04 0.10.0 2.3.1 2.4.0 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index e5330b3d33..767a471795 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:3.0.0-alpha1-20180817.3 -commithash:134cdbee9bee29dd3ccb654c67663b27b9ffa6c8 +version:3.0.0-alpha1-20180821.3 +commithash:0939a90812deb1c604eb9a4768869687495fc1dd From 4d98ea801e0b9650142679bc4017e947e6701d97 Mon Sep 17 00:00:00 2001 From: Ajay Bhargav Baaskaran Date: Wed, 29 Aug 2018 15:50:53 -0700 Subject: [PATCH 28/41] Test basic link generation in Razor pages in both regular and endpoint routing --- .../RoutingTestsBase.cs | 18 ++++++++++++++++++ test/WebSites/RoutingWebSite/Pages/Edit.cshtml | 3 +++ .../RoutingWebSite/Pages/PageWithLinks.cshtml | 8 ++++++++ 3 files changed, 29 insertions(+) create mode 100644 test/WebSites/RoutingWebSite/Pages/Edit.cshtml create mode 100644 test/WebSites/RoutingWebSite/Pages/PageWithLinks.cshtml diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/RoutingTestsBase.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/RoutingTestsBase.cs index 6430ff2005..c6def42f6f 100644 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/RoutingTestsBase.cs +++ b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/RoutingTestsBase.cs @@ -1241,6 +1241,24 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests Assert.Equal(actionName, result.Action); } + [Fact] + public async Task RazorPage_WithLinks_GeneratesLinksCorrectly() + { + // Arrange & Act + var response = await Client.GetAsync("http://localhost/PageWithLinks"); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var document = await response.GetHtmlDocumentAsync(); + + var editLink = document.RequiredQuerySelector("#editlink"); + Assert.Equal("/Edit/10", editLink.GetAttribute("href")); + + var contactLink = document.RequiredQuerySelector("#contactlink"); + Assert.Equal("/Home/Contact", contactLink.GetAttribute("href")); + } + protected static LinkBuilder LinkFrom(string url) { return new LinkBuilder(url); diff --git a/test/WebSites/RoutingWebSite/Pages/Edit.cshtml b/test/WebSites/RoutingWebSite/Pages/Edit.cshtml new file mode 100644 index 0000000000..b7f2033dc9 --- /dev/null +++ b/test/WebSites/RoutingWebSite/Pages/Edit.cshtml @@ -0,0 +1,3 @@ +@page "{id}" + +Hello from Edit page diff --git a/test/WebSites/RoutingWebSite/Pages/PageWithLinks.cshtml b/test/WebSites/RoutingWebSite/Pages/PageWithLinks.cshtml new file mode 100644 index 0000000000..660d9443f4 --- /dev/null +++ b/test/WebSites/RoutingWebSite/Pages/PageWithLinks.cshtml @@ -0,0 +1,8 @@ +@page +@addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers" +@{ +} + +Edit +
+Contact From 01b41a710eda3e73ae085036054d987cec3d6b47 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Thu, 30 Aug 2018 11:29:37 -0700 Subject: [PATCH 29/41] Log harder on the CI --- build/repo.props | 1 + 1 file changed, 1 insertion(+) diff --git a/build/repo.props b/build/repo.props index 8156b45eaf..d1a3039193 100644 --- a/build/repo.props +++ b/build/repo.props @@ -3,6 +3,7 @@ true + true From 198f19305c681a081ab736d6b7b9746f7a6ae100 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 2 Sep 2018 19:22:59 +0000 Subject: [PATCH 30/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 154 +++++++++++++++++++-------------------- 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 214224647a..a6375d642e 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -16,94 +16,94 @@ 0.43.0 2.1.1.1 2.1.1 - 3.0.0-alpha1-10352 + 3.0.0-alpha1-10393 3.0.0-alpha1-20180821.3 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 5.2.6 2.8.0 2.8.0 - 3.0.0-alpha1-10352 + 3.0.0-alpha1-10393 1.7.0 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-preview1-26821-04 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-preview1-26830-01 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 2.0.9 2.1.2 2.2.0-preview1-26618-02 - 3.0.0-alpha1-10352 - 3.0.0-alpha1-10352 + 3.0.0-alpha1-10393 + 3.0.0-alpha1-10393 15.6.1 - 4.7.49 + 4.9.0 2.0.3 1.0.1 - 4.6.0-preview1-26817-04 - 4.6.0-preview1-26817-04 - 4.6.0-preview1-26817-04 + 4.6.0-preview1-26829-04 + 4.6.0-preview1-26829-04 + 4.6.0-preview1-26829-04 0.10.0 2.3.1 2.4.0 From 32160e9fd57b8b8ed6784895207a91ef3593ad5d Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Wed, 5 Sep 2018 23:55:31 +0000 Subject: [PATCH 31/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 156 +++++++++++++++++++-------------------- 1 file changed, 78 insertions(+), 78 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index a6375d642e..67761a1add 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -16,94 +16,94 @@ 0.43.0 2.1.1.1 2.1.1 - 3.0.0-alpha1-10393 + 3.0.0-alpha1-10400 3.0.0-alpha1-20180821.3 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 5.2.6 2.8.0 2.8.0 - 3.0.0-alpha1-10393 + 3.0.0-alpha1-10400 1.7.0 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-preview1-26830-01 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-preview1-26905-03 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 2.0.9 - 2.1.2 - 2.2.0-preview1-26618-02 - 3.0.0-alpha1-10393 - 3.0.0-alpha1-10393 + 2.1.3 + 2.2.0-preview2-26905-02 + 3.0.0-alpha1-10400 + 3.0.0-alpha1-10400 15.6.1 4.9.0 2.0.3 1.0.1 - 4.6.0-preview1-26829-04 - 4.6.0-preview1-26829-04 - 4.6.0-preview1-26829-04 + 4.6.0-preview1-26831-06 + 4.6.0-preview1-26831-06 + 4.6.0-preview1-26831-06 0.10.0 2.3.1 2.4.0 From fde503d03adea0d2b3bac06cc61177a00e02be0d Mon Sep 17 00:00:00 2001 From: Takaaki Suzuki Date: Wed, 5 Sep 2018 18:07:17 +0900 Subject: [PATCH 32/41] Don't call GetValidity method twice. --- .../ModelBinding/ModelStateDictionary.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.AspNetCore.Mvc.Abstractions/ModelBinding/ModelStateDictionary.cs b/src/Microsoft.AspNetCore.Mvc.Abstractions/ModelBinding/ModelStateDictionary.cs index 68781961e6..ad4d64c3ae 100644 --- a/src/Microsoft.AspNetCore.Mvc.Abstractions/ModelBinding/ModelStateDictionary.cs +++ b/src/Microsoft.AspNetCore.Mvc.Abstractions/ModelBinding/ModelStateDictionary.cs @@ -147,7 +147,8 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding { get { - return ValidationState == ModelValidationState.Valid || ValidationState == ModelValidationState.Skipped; + var state = ValidationState; + return state == ModelValidationState.Valid || state == ModelValidationState.Skipped; } } From 64b0f298de9fd4618f28bc1f7147e515003be195 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Fri, 7 Sep 2018 13:33:46 +1200 Subject: [PATCH 33/41] React to obsolete DefaultInlineConstraintResolver ctor (#8409) --- build/dependencies.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index ea25042d20..1a6b68ce6a 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -48,8 +48,8 @@ 3.0.0-alpha1-10400 3.0.0-alpha1-10400 3.0.0-alpha1-10400 - 3.0.0-a-alpha1-link-generator-master-16955 - 3.0.0-a-alpha1-link-generator-master-16955 + 3.0.0-a-alpha1-master-reenable-obsolete-16958 + 3.0.0-a-alpha1-master-reenable-obsolete-16958 3.0.0-alpha1-10400 3.0.0-alpha1-10400 3.0.0-alpha1-10400 From 99d277ae512b3dbb6556814a6634b4d17a3f6b0f Mon Sep 17 00:00:00 2001 From: gqqnbig Date: Fri, 7 Sep 2018 08:54:53 -0700 Subject: [PATCH 34/41] LocalizedHtmlString.Value doesn't include arguments (#8376) * Clarify that Value is prior to formatting with any constructor arguments --- .../LocalizedHtmlString.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.AspNetCore.Mvc.Localization/LocalizedHtmlString.cs b/src/Microsoft.AspNetCore.Mvc.Localization/LocalizedHtmlString.cs index ed91460d69..fdc99aeebc 100644 --- a/src/Microsoft.AspNetCore.Mvc.Localization/LocalizedHtmlString.cs +++ b/src/Microsoft.AspNetCore.Mvc.Localization/LocalizedHtmlString.cs @@ -72,7 +72,7 @@ namespace Microsoft.AspNetCore.Mvc.Localization public string Name { get; } /// - /// The string resource. + /// The original resource string, prior to formatting with any constructor arguments. /// public string Value { get; } @@ -98,4 +98,4 @@ namespace Microsoft.AspNetCore.Mvc.Localization formattableString.WriteTo(writer, encoder); } } -} \ No newline at end of file +} From 5eff5a43fb966c58f1a5c146d7309fb662091488 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 9 Sep 2018 19:25:09 +0000 Subject: [PATCH 35/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 154 +++++++++++++++++++-------------------- korebuild-lock.txt | 4 +- 2 files changed, 79 insertions(+), 79 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 1a6b68ce6a..2d050760eb 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -16,94 +16,94 @@ 0.43.0 2.1.1.1 2.1.1 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-20180821.3 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-a-alpha1-master-reenable-obsolete-16958 - 3.0.0-a-alpha1-master-reenable-obsolete-16958 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-20180907.9 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 5.2.6 2.8.0 2.8.0 - 3.0.0-alpha1-10400 + 3.0.0-alpha1-10419 1.7.0 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-preview1-26905-03 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-preview1-26907-04 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 2.0.9 2.1.3 2.2.0-preview2-26905-02 - 3.0.0-alpha1-10400 - 3.0.0-alpha1-10400 + 3.0.0-alpha1-10419 + 3.0.0-alpha1-10419 15.6.1 4.9.0 2.0.3 1.0.1 - 4.6.0-preview1-26831-06 - 4.6.0-preview1-26831-06 - 4.6.0-preview1-26831-06 + 4.6.0-preview1-26905-03 + 4.6.0-preview1-26905-03 + 4.6.0-preview1-26905-03 0.10.0 2.3.1 2.4.0 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 767a471795..b614cab6e8 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:3.0.0-alpha1-20180821.3 -commithash:0939a90812deb1c604eb9a4768869687495fc1dd +version:3.0.0-alpha1-20180907.9 +commithash:f997365a8832ff0a3cbd9a98df45734ac2723fa0 From 3671faf2ac2d8df428609facda5493b544a7c522 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Thu, 13 Sep 2018 09:21:03 +1200 Subject: [PATCH 36/41] Update routing dependency --- build/dependencies.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 2d050760eb..39493f75c5 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -48,8 +48,8 @@ 3.0.0-alpha1-10419 3.0.0-alpha1-10419 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 + 3.0.0-a-alpha1-master-parameter-transformer-16977 + 3.0.0-a-alpha1-master-parameter-transformer-16977 3.0.0-alpha1-10419 3.0.0-alpha1-10419 3.0.0-alpha1-10419 From 6129c33ef8e7969aea7320700c4266d90e9826be Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 16 Sep 2018 19:24:22 +0000 Subject: [PATCH 37/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 154 +++++++++++++++++++-------------------- korebuild-lock.txt | 4 +- 2 files changed, 79 insertions(+), 79 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 39493f75c5..4bbe970ad7 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -16,94 +16,94 @@ 0.43.0 2.1.1.1 2.1.1 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-20180907.9 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-a-alpha1-master-parameter-transformer-16977 - 3.0.0-a-alpha1-master-parameter-transformer-16977 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-20180911.2 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 5.2.6 2.8.0 2.8.0 - 3.0.0-alpha1-10419 + 3.0.0-alpha1-10454 1.7.0 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-preview1-26907-04 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-preview1-26907-05 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 2.0.9 2.1.3 2.2.0-preview2-26905-02 - 3.0.0-alpha1-10419 - 3.0.0-alpha1-10419 + 3.0.0-alpha1-10454 + 3.0.0-alpha1-10454 15.6.1 4.9.0 2.0.3 1.0.1 - 4.6.0-preview1-26905-03 - 4.6.0-preview1-26905-03 - 4.6.0-preview1-26905-03 + 4.6.0-preview1-26907-04 + 4.6.0-preview1-26907-04 + 4.6.0-preview1-26907-04 0.10.0 2.3.1 2.4.0 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index b614cab6e8..a817c10d28 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:3.0.0-alpha1-20180907.9 -commithash:f997365a8832ff0a3cbd9a98df45734ac2723fa0 +version:3.0.0-alpha1-20180911.2 +commithash:2a2b7dbea1b247930c41da497f4ea0b2bb756818 From a7513ce2825f76d3dec1b0b93ed79990b7cbfb07 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Fri, 21 Sep 2018 11:47:19 -0700 Subject: [PATCH 38/41] Update dependencies.props --- build/dependencies.props | 146 +++++++++++++++++++-------------------- korebuild-lock.txt | 4 +- 2 files changed, 75 insertions(+), 75 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index a64554a77d..f6f4c79d65 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -16,87 +16,87 @@ 0.43.0 2.1.1.1 2.1.1 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-20180911.2 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-a-alpha1-outbound-parameter-transformer-master-16998 - 3.0.0-a-alpha1-outbound-parameter-transformer-master-16998 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-20180919.1 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 5.2.6 2.8.0 2.8.0 - 3.0.0-alpha1-10454 + 3.0.0-alpha1-10486 1.7.0 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 3.0.0-preview1-26907-05 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 2.0.9 2.1.3 2.2.0-preview2-26905-02 - 3.0.0-alpha1-10454 - 3.0.0-alpha1-10454 + 3.0.0-alpha1-10486 + 3.0.0-alpha1-10486 15.6.1 4.9.0 2.0.3 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index a817c10d28..d66a13bdc7 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:3.0.0-alpha1-20180911.2 -commithash:2a2b7dbea1b247930c41da497f4ea0b2bb756818 +version:3.0.0-alpha1-20180919.1 +commithash:3066ae0a230870ea07e3f132605b5e5493f8bbd4 From bd2754160e2deed18d73ae5be5f88ead82874d86 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 23 Sep 2018 12:22:59 -0700 Subject: [PATCH 39/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 144 +++++++++++++++++++-------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 38b9bd5fc5..92951ffb8f 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -16,87 +16,87 @@ 0.43.0 2.1.1.1 2.1.1 - 3.0.0-alpha1-10486 + 3.0.0-alpha1-10495 3.0.0-alpha1-20180919.1 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-a-alpha1-ambientvalues-master-17010 - 3.0.0-a-alpha1-ambientvalues-master-17010 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 5.2.6 2.8.0 2.8.0 - 3.0.0-alpha1-10486 + 3.0.0-alpha1-10495 1.7.0 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 3.0.0-preview1-26907-05 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 2.0.9 2.1.3 2.2.0-preview2-26905-02 - 3.0.0-alpha1-10486 - 3.0.0-alpha1-10486 + 3.0.0-alpha1-10495 + 3.0.0-alpha1-10495 15.6.1 4.9.0 2.0.3 From 235ab17ed4256afd1ccfed306dd8044290ee3651 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 30 Sep 2018 12:23:24 -0700 Subject: [PATCH 40/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 144 +++++++++++++++++++-------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 92951ffb8f..8ee522d62a 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -16,87 +16,87 @@ 0.43.0 2.1.1.1 2.1.1 - 3.0.0-alpha1-10495 + 3.0.0-alpha1-10549 3.0.0-alpha1-20180919.1 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 5.2.6 2.8.0 2.8.0 - 3.0.0-alpha1-10495 + 3.0.0-alpha1-10549 1.7.0 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 3.0.0-preview1-26907-05 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 2.0.9 2.1.3 2.2.0-preview2-26905-02 - 3.0.0-alpha1-10495 - 3.0.0-alpha1-10495 + 3.0.0-alpha1-10549 + 3.0.0-alpha1-10549 15.6.1 4.9.0 2.0.3 From 39dff62893e54137b170197b735b87887ff15553 Mon Sep 17 00:00:00 2001 From: Doug Bunting Date: Wed, 3 Oct 2018 22:32:42 -0700 Subject: [PATCH 41/41] Slight change for `master` branch --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 775ed6bd0c..babc35f1d9 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ASP.NET Core MVC **Note: For ASP.NET MVC 5.x, Web API 2.x, and Web Pages 3.x (not ASP.NET Core), see https://github.com/aspnet/AspNetWebStack** -Travis: [![Travis](https://travis-ci.org/aspnet/Mvc.svg?branch=release/2.2)](https://travis-ci.org/aspnet/Mvc) +Travis: [![Travis](https://travis-ci.org/aspnet/Mvc.svg?branch=master)](https://travis-ci.org/aspnet/Mvc) ASP.NET Core MVC gives you a powerful, patterns-based way to build dynamic websites that enables a clean separation of concerns and gives you full control over markup for enjoyable, agile development. ASP.NET Core MVC includes many features that enable fast, TDD-friendly development for creating sophisticated applications that use the latest web standards.