From 3df34dbbfef274c0b89d02e4b681771dc8e8e5ce Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Tue, 24 Jul 2018 05:20:53 -0700 Subject: [PATCH] React to Routing repo's LinkGenerator api changes --- .../Routing/GlobalRoutingUrlHelper.cs | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Routing/GlobalRoutingUrlHelper.cs b/src/Microsoft.AspNetCore.Mvc.Core/Routing/GlobalRoutingUrlHelper.cs index e77274c3cd..13dd697fce 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Routing/GlobalRoutingUrlHelper.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Routing/GlobalRoutingUrlHelper.cs @@ -94,10 +94,13 @@ namespace Microsoft.AspNetCore.Mvc.Routing }); var successfullyGeneratedLink = _linkGenerator.TryGetLink( - ActionContext.HttpContext, - endpoints, - valuesDictionary, - AmbientValues, + new LinkGeneratorContext + { + HttpContext = ActionContext.HttpContext, + Endpoints = endpoints, + ExplicitValues = valuesDictionary, + AmbientValues = AmbientValues + }, out var link); if (!successfullyGeneratedLink) @@ -129,10 +132,13 @@ namespace Microsoft.AspNetCore.Mvc.Routing }); var successfullyGeneratedLink = _linkGenerator.TryGetLink( - ActionContext.HttpContext, - endpoints, - valuesDictionary, - AmbientValues, + new LinkGeneratorContext + { + HttpContext = ActionContext.HttpContext, + Endpoints = endpoints, + ExplicitValues = valuesDictionary, + AmbientValues = AmbientValues + }, out var link); if (!successfullyGeneratedLink)