Implemented interface members:
147 writes to
Microsoft.AspNetCore.Diagnostics.Tests (4)
ExceptionHandlerMiddlewareTest.cs (2)
86httpContext.Request.RouteValues["John"] = "Doe"; 108httpContext.Request.RouteValues["John"] = "Doe";
StatusCodeMiddlewareTest.cs (2)
158httpContext.Request.RouteValues["John"] = "Doe"; 214httpContext.Request.RouteValues["John"] = "Doe";
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Internal\JsonTranscodingRouteAdapter.cs (1)
160context.Request.RouteValues[fullPath] = finalValue;
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (9)
ServerStreamingServerCallHandlerTests.cs (5)
57httpContext.Request.RouteValues["name"] = "TestName!"; 104httpContext.Request.RouteValues["name"] = "TestName!"; 146httpContext.Request.RouteValues["name"] = "TestName!"; 187httpContext.Request.RouteValues["name"] = "TestName!"; 238httpContext.Request.RouteValues["name"] = "TestName!";
UnaryServerCallHandlerTests.cs (4)
66httpContext.Request.RouteValues["name"] = "TestName!"; 67httpContext.Request.RouteValues["sub.subfield"] = "Subfield!"; 109httpContext.Request.RouteValues["name"] = name; 143httpContext.Request.RouteValues["name"] = "Doesn't matter";
Microsoft.AspNetCore.Http.Abstractions.Tests (8)
RouteValueDictionaryTests.cs (8)
564dict[""] = "foo"; 577dict["key"] = "value"; 591dict["key"] = "value"; 608dict["key"] = "value"; 622dict["kEy"] = "value"; 639dict["key"] = "value"; 659dict["key"] = "value"; 676dict["key"] = "value";
Microsoft.AspNetCore.Http.Extensions.Tests (24)
RequestDelegateFactoryTests.cs (1)
1564httpContext.Request.RouteValues[paramName] = routeParam;
RequestDelegateGenerator\CompileTimeCreationTests.cs (2)
147httpContext.Request.RouteValues["id"] = i.ToString(CultureInfo.InvariantCulture); 531httpContext.Request.RouteValues[value] = value;
RequestDelegateGenerator\RequestDelegateCreationTests.AsParameters.cs (8)
28httpContext.Request.RouteValues["value"] = originalRouteParam.ToString(NumberFormatInfo.InvariantInfo); 200httpContext.Request.RouteValues[paramName] = originalRouteParam.ToString(NumberFormatInfo.InvariantInfo); 280httpContext.Request.RouteValues[nameof(ParameterListWithReadOnlyProperties.Value)] = routeParamValue.ToString(NumberFormatInfo.InvariantInfo); 281httpContext.Request.RouteValues[nameof(ParameterListWithReadOnlyProperties.ConstantValue)] = routeParamValue.ToString(NumberFormatInfo.InvariantInfo); 282httpContext.Request.RouteValues[nameof(ParameterListWithReadOnlyProperties.ReadOnlyValue)] = routeParamValue.ToString(NumberFormatInfo.InvariantInfo); 283httpContext.Request.RouteValues[nameof(ParameterListWithReadOnlyProperties.PrivateSetValue)] = routeParamValue.ToString(NumberFormatInfo.InvariantInfo); 313httpContext.Request.RouteValues[nameof(SampleParameterList.Foo)] = foo.ToString(NumberFormatInfo.InvariantInfo); 314httpContext.Request.RouteValues[nameof(AdditionalSampleParameterList.Bar)] = bar.ToString(NumberFormatInfo.InvariantInfo);
RequestDelegateGenerator\RequestDelegateCreationTests.Logging.cs (4)
98httpContext.Request.RouteValues["tryParsable"] = "invalid!"; 99httpContext.Request.RouteValues["tryParsable2"] = "invalid again!"; 149httpContext.Request.RouteValues["tryParsable"] = "invalid!"; 150httpContext.Request.RouteValues["tryParsable2"] = "invalid again!";
RequestDelegateGenerator\RequestDelegateCreationTests.RouteParameter.cs (7)
53httpContext.Request.RouteValues["routeValue"] = requestData; 113httpContext.Request.RouteValues["value"] = expectedBody; 135httpContext.Request.RouteValues["value"] = "fromRoute"; 152httpContext.Request.RouteValues["value"] = "fromRoute"; 186httpContext.Request.RouteValues[routeParameterName] = "test"; 202httpContext.Request.RouteValues[unmatchedName] = unmatchedRouteParam.ToString(NumberFormatInfo.InvariantInfo); 226httpContext.Request.RouteValues[paramName] = originalRouteParam.ToString(NumberFormatInfo.InvariantInfo);
RequestDelegateGenerator\RequestDelegateCreationTests.TryParse.cs (2)
257httpContext.Request.RouteValues["tryParsable"] = routeValue; 277httpContext.Request.RouteValues["myBindAsyncRecord"] = "foo";
Microsoft.AspNetCore.Http.Microbenchmarks (1)
RouteValueDictionaryBenchmark.cs (1)
282dictionary["action"] = "About";
Microsoft.AspNetCore.Http.Tests (1)
Internal\DefaultHttpRequestTests.cs (1)
210request.RouteValues["new"] = "setvalue";
Microsoft.AspNetCore.Mvc.Core (21)
Builder\ControllerEndpointRouteBuilderExtensions.cs (2)
156defaultsDictionary["area"] = defaultsDictionary["area"] ?? areaName; 159constraintsDictionary["area"] = constraintsDictionary["area"] ?? new StringRouteConstraint(areaName);
Builder\MvcAreaRouteBuilderExtensions.cs (2)
124defaultsDictionary["area"] = defaultsDictionary["area"] ?? areaName; 127constraintsDictionary["area"] = constraintsDictionary["area"] ?? new StringRouteConstraint(areaName);
Routing\ActionEndpointFactory.cs (4)
195requiredValues[key] = RoutePattern.RequiredValueAny; 199requiredValues[key] = value; 203requiredValues[key] = null; 301updatedDefaults[routeValue.Key] = routeValue.Value;
Routing\EndpointRoutingUrlHelper.cs (4)
47values["action"] = action; 52values["action"] = urlActionContext.Action; 60values["controller"] = controller; 65values["controller"] = urlActionContext.Controller;
Routing\MvcAttributeRouteHandler.cs (1)
65context.RouteData.Values[kvp.Key] = kvp.Value;
Routing\UrlHelperBase.cs (8)
237values["action"] = obj; 242values["action"] = action; 250values["controller"] = obj; 255values["controller"] = controller; 272values["page"] = value; 277values["page"] = CalculatePageName(context, ambientValues, page); 286values["handler"] = null; 291values["handler"] = handler;
Microsoft.AspNetCore.Mvc.Core.Test (2)
Formatters\FormatFilterTest.cs (1)
309context.RouteData.Values["format"] = new DateTimeOffset(2018, 10, 31, 7, 37, 38, TimeSpan.FromHours(-7));
Routing\EndpointRoutingUrlHelperTest.cs (1)
87urlHelper.ActionContext.RouteData.Values["id"] = "500";
Microsoft.AspNetCore.Mvc.Razor.Test (5)
RazorViewEngineTest.cs (5)
1620actionContext.RouteData.Values[key] = "route-value"; 1644actionContext.RouteData.Values[key] = new DateTimeOffset(2018, 10, 31, 7, 37, 38, TimeSpan.FromHours(-7)); 1667actionContext.RouteData.Values[key] = "route-value"; 1690actionContext.RouteData.Values[key] = "route-value"; 1717actionContext.RouteData.Values[key] = 43;
Microsoft.AspNetCore.Mvc.Routing.Abstractions.Tests (1)
VirtualPathDataTests.cs (1)
34dataTokens["TestKey"] = "TestValue";
Microsoft.AspNetCore.Mvc.TagHelpers (3)
AnchorTagHelper.cs (1)
231routeValues["area"] = Area;
FormActionTagHelper.cs (1)
244routeValues["area"] = Area;
FormTagHelper.cs (1)
251routeValues["area"] = Area;
Microsoft.AspNetCore.Mvc.TagHelpers.Test (4)
CacheTagKeyTest.cs (4)
291cacheTagHelper.ViewContext.RouteData.Values["id"] = 4; 292cacheTagHelper.ViewContext.RouteData.Values["category"] = "MyCategory"; 314cacheTagHelper.ViewContext.RouteData.Values["id"] = 4; 315cacheTagHelper.ViewContext.RouteData.Values["category"] =
Microsoft.AspNetCore.Mvc.ViewFeatures (3)
RemoteAttribute.cs (3)
66RouteData["action"] = action; 71RouteData["controller"] = controller; 98RouteData["area"] = areaName;
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (5)
PartialViewResultExecutorTest.cs (2)
83context.RouteData.Values["action"] = new DateTimeOffset(2018, 10, 31, 7, 37, 38, TimeSpan.FromHours(-7)); 336routeData.Values["action"] = actionName;
RemoteAttributeTest.cs (1)
405routeData.Values["area"] = currentArea;
ViewResultExecutorTest.cs (2)
82context.RouteData.Values["action"] = new DateTimeOffset(2018, 10, 31, 7, 37, 38, TimeSpan.FromHours(-7)); 326routeData.Values["action"] = actionName;
Microsoft.AspNetCore.OutputCaching.Tests (10)
OutputCacheKeyProviderTests.cs (10)
99context.HttpContext.Request.RouteValues["RouteA"] = "ValueA"; 100context.HttpContext.Request.RouteValues["RouteB"] = "ValueB"; 112context.HttpContext.Request.RouteValues["RouteA"] = 123.456; 270context.HttpContext.Request.RouteValues["RouteA"] = "ValueA"; 271context.HttpContext.Request.RouteValues["RouteB"] = "ValueB"; 390context.HttpContext.Request.RouteValues["RouteA"] = "ValueA" + KeyDelimiter; 391context.HttpContext.Request.RouteValues["RouteB"] = "ValueB"; 404context.HttpContext.Request.RouteValues["RouteA"] = "ValueA"; 405context.HttpContext.Request.RouteValues["RouteB"] = "ValueB" + KeyDelimiter; 419context.HttpContext.Request.RouteValues["RouteA"] = "ValueA";
Microsoft.AspNetCore.Routing (8)
Patterns\RoutePatternMatcher.cs (6)
181values[parameter.Name] = defaultValue; 255values[parameter.Name] = captured; 260values[parameter.Name] = _defaultValues[index]; 273values[parameter.Name] = requestSegment.ToString(); 279values[parameter.Name] = _defaultValues[index]; 495values[item.Key] = item.Value;
RouteBase.cs (1)
284destination[kvp.Key] = kvp.Value;
Template\TemplateBinder.cs (1)
509acceptedValues[parameterName] = transformer.TransformOutbound(value);
Microsoft.AspNetCore.Routing.Abstractions (2)
RouteData.cs (2)
172Values[kvp.Key] = kvp.Value; 181DataTokens[kvp.Key] = kvp.Value;
Microsoft.AspNetCore.Routing.Microbenchmarks (3)
LinkGeneration\LinkGenerationGithubBenchmark.cs (3)
41_lookUpValues["owner"] = "aspnet"; 42_lookUpValues["repo"] = "routing"; 43_lookUpValues["commentId"] = "20202";
Microsoft.AspNetCore.Routing.Tests (21)
Builder\GroupTest.cs (5)
46httpContext.Request.RouteValues["id"] = "42"; 78httpContext.Request.RouteValues["org"] = "dotnet"; 79httpContext.Request.RouteValues["id"] = "42"; 112httpContext.Request.RouteValues["org"] = "dotnet"; 113httpContext.Request.RouteValues["id"] = "42";
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (7)
203httpContext.Request.RouteValues["id"] = "42"; 538httpContext.Request.RouteValues["id"] = "13"; 616httpContext.Request.RouteValues["value"] = "42"; 640httpContext.Request.RouteValues["id"] = "42"; 822httpContext.Request.RouteValues["id"] = "invalid!"; 849httpContext.Request.RouteValues["id"] = "invalid!"; 897httpContext.Request.RouteValues["id"] = "2";
DefaultLinkGeneratorTest.cs (3)
639values[routeNames[i]] = routeValues[i]; 678values[routeNames[i]] = routeValues[i]; 716values[routeNames[i]] = routeValues[i];
EndpointRoutingMiddlewareTest.cs (2)
110routeData.Values["testKey"] = "testValue"; 133routeData.Values["testKey"] = "testValue";
Tree\TreeRouterTest.cs (4)
579context.RouteData.Values["path"] = "existing-value"; 602context.RouteData.Values["path"] = "existing-value"; 2027entry.Defaults["test_route_group"] = CreateRouteGroup(order, template); 2048entry.Defaults["test_route_group"] = CreateRouteGroup(order, template);
Mvc.RoutingWebSite (11)
Controllers\LG1Controller.cs (3)
42values["area"] = "Admin"; 70values["area"] = "Admin"; 110values["area"] = "Admin";
StartupForDynamic.cs (2)
57results[split[0]] = split[1]; 60results["version"] = ((DynamicVersion)State).Version;
StartupForDynamicAndRazorPages.cs (1)
48results[split[0]] = split[1];
StartupForDynamicOrder.cs (5)
99results["controller"] = "Home"; 100results["action"] = "Index"; 104results["Page"] = "/DynamicPage"; 112results[split[0]] = split[1]; 116results["identifier"] = ((TransformerState)State).Identifier;
224 references to
DefaultBuilder.SampleApp (5)
Program.cs (5)
45.MapGet("hello/{name}", (req, res, data) => res.WriteAsync($"Hello, {data.Values["name"]}")) 46.MapGet("goodbye/{name}", (req, res, data) => res.WriteAsync($"Goodbye, {data.Values["name"]}")) 47.MapGet("throw/{message?}", (req, res, data) => throw new Exception((string)data.Values["message"] ?? "Uh oh!")) 48.MapGet("{greeting}/{name}", (req, res, data) => res.WriteAsync($"{data.Values["greeting"]}, {data.Values["name"]}"))
Microsoft.AspNetCore.Diagnostics.Tests (2)
ExceptionHandlerMiddlewareTest.cs (1)
115Assert.Equal("Doe", feature.RouteValues["John"]);
StatusCodeMiddlewareTest.cs (1)
227Assert.Equal("Doe", statusCodeReExecuteFeature.RouteValues["John"]);
Microsoft.AspNetCore.Grpc.JsonTranscoding (2)
Internal\JsonRequestHelpers.cs (1)
282var routeValue = serverCallContext.HttpContext.Request.RouteValues[parameterDescriptor.Key];
Internal\JsonTranscodingRouteAdapter.cs (1)
149values[i] = context.Request.RouteValues[variableParts[i]];
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (8)
JsonTranscodingRouteAdapterTests.cs (8)
47Assert.Equal("shelves/first/books/second", httpContext.Request.RouteValues["book.name"]); 146Assert.Equal("a/my/value/b", httpContext.Request.RouteValues["x.y.z"]); 165Assert.Equal("a/my/value/b", httpContext.Request.RouteValues["x.y.z"]); 184Assert.Equal("c/value", httpContext.Request.RouteValues["b"]); 203Assert.Equal("c/value/d", httpContext.Request.RouteValues["b"]); 222Assert.Equal("c/value", httpContext.Request.RouteValues["b"]); 259Assert.Equal("test/name", httpContext.Request.RouteValues["name"]); 278Assert.Equal("test/name/", httpContext.Request.RouteValues["name"]);
Microsoft.AspNetCore.Http.Abstractions.Tests (11)
RouteValueDictionaryTests.cs (11)
445var value = dict[""]; 458var value = dict["key"]; 471var value = dict["key"]; 485var value = dict["key"]; 499var value = dict["kEy"]; 516var value = dict["key"]; 533var value = dict["key"]; 550var value = dict["kEy"]; 567Assert.Equal("foo", dict[""]); 841Assert.Equal("foo", dict[""]); 2103Assert.Equal(10, dictionary["aa"]);
Microsoft.AspNetCore.Http.Microbenchmarks (6)
RouteValueDictionaryBenchmark.cs (6)
252GC.KeepAlive(dictionary["action"]); 253GC.KeepAlive(dictionary["controller"]); 254GC.KeepAlive(dictionary["id"]); 262GC.KeepAlive(dictionary["action"]); 263GC.KeepAlive(dictionary["controller"]); 264GC.KeepAlive(dictionary["id"]);
Microsoft.AspNetCore.Http.Tests (2)
Internal\DefaultHttpRequestTests.cs (2)
211Assert.Equal("setvalue", request.RouteValues["new"]); 220Assert.Equal("value", request.RouteValues["key"]);
Microsoft.AspNetCore.Mvc.Core (5)
Builder\ControllerEndpointRouteBuilderExtensions.cs (2)
156defaultsDictionary["area"] = defaultsDictionary["area"] ?? areaName; 159constraintsDictionary["area"] = constraintsDictionary["area"] ?? new StringRouteConstraint(areaName);
Builder\MvcAreaRouteBuilderExtensions.cs (2)
124defaultsDictionary["area"] = defaultsDictionary["area"] ?? areaName; 127constraintsDictionary["area"] = constraintsDictionary["area"] ?? new StringRouteConstraint(areaName);
Routing\UrlHelperBase.cs (1)
389currentPagePath = Convert.ToString(ambientValues["page"], CultureInfo.InvariantCulture);
Microsoft.AspNetCore.Mvc.Core.Test (1)
Routing\AttributeRouteTest.cs (1)
91Assert.Equal("5", context.RouteData.Values["key2"]);
Microsoft.AspNetCore.Mvc.RazorPages (1)
Infrastructure\DefaultPageHandlerMethodSelector.cs (1)
149var handlerName = Convert.ToString(context.RouteData.Values[Handler], CultureInfo.InvariantCulture);
Microsoft.AspNetCore.Mvc.Routing.Abstractions.Tests (1)
VirtualPathDataTests.cs (1)
43Assert.Equal("TestValue", pathData.DataTokens["TestKey"]);
Microsoft.AspNetCore.Mvc.TagHelpers (1)
Cache\CacheTagKey.cs (1)
25Convert.ToString(c[key], CultureInfo.InvariantCulture);
Microsoft.AspNetCore.Mvc.TagHelpers.Test (1)
FormTagHelperTest.cs (1)
820It.Is<RouteValueDictionary>(m => string.Equals(m["name"], "value")),
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (13)
ControllerUnitTestabilityTests.cs (6)
336Assert.Equal("sample", createdAtRouteResult.RouteValues["route"]); 372Assert.Equal("sample", acceptedAtRouteResult.RouteValues["route"]); 410Assert.Equal("sample", createdAtActionResult.RouteValues["route"]); 449Assert.Equal("sample", acceptedAtActionResult.RouteValues["route"]); 485Assert.Equal("sample", redirectToRouteResult.RouteValues["route"]); 520Assert.Equal("sample", redirectToActionResult.RouteValues["route"]);
PageRemoteAttributeTest.cs (2)
57Assert.Equal("/Foo", routeDictionary["page"] as string); 58Assert.Equal("Bar", routeDictionary["handler"] as string);
RemoteAttributeTest.cs (5)
190Assert.Equal("Action", routeDictionary["action"] as string); 191Assert.Equal("Controller", routeDictionary["controller"] as string); 211Assert.Equal("Action", routeDictionary["action"] as string); 212Assert.Equal("Controller", routeDictionary["controller"] as string); 213Assert.Equal("Test", routeDictionary["area"] as string);
Microsoft.AspNetCore.Routing (1)
Matching\DfaMatcher.cs (1)
308Log.CandidateRejectedByConstraint(_logger, httpContext.Request.Path, endpoint, constraint.Key, constraint.Value, values[constraint.Key]);
Microsoft.AspNetCore.Routing.Abstractions (1)
RoutingHttpContextExtensions.cs (1)
41return httpContext.Features.Get<IRouteValuesFeature>()?.RouteValues[key];
Microsoft.AspNetCore.Routing.FunctionalTests (5)
WebHostBuilderExtensionsTest.cs (5)
24(rb) => rb.MapGet("greeting/{name}", (req, resp, routeData) => resp.WriteAsync($"Hello! {routeData.Values["name"]}")), 35await resp.WriteAsync($"{routeData.Values["name"]} {data}"); 47await resp.WriteAsync($"{routeData.Values["name"]} {data}"); 53(rb) => rb.MapDelete("greeting/{name}", (req, resp, routeData) => resp.WriteAsync($"Hello! {routeData.Values["name"]}")), 65await resp.WriteAsync($"{routeData.Values["name"]} {data}");
Microsoft.AspNetCore.Routing.Microbenchmarks (3)
LinkGeneration\LinkGenerationGithubBenchmark.cs (3)
49var url = $"/repos/{_lookUpValues["owner"]}/{_lookUpValues["repo"]}/issues/comments/{_lookUpValues["commentId"]}";
Microsoft.AspNetCore.Routing.Tests (146)
Matching\CandidateSetTest.cs (1)
363Assert.Equal(i, state.Values["i"]);
Matching\DfaMatcherTest.cs (3)
271Assert.Equal("TestAction", httpContext.Request.RouteValues["action"]); 272Assert.Equal("TestController", httpContext.Request.RouteValues["controller"]); 273Assert.Equal("17", httpContext.Request.RouteValues["id"]);
Patterns\RoutePatternMatcherTest.cs (43)
24Assert.Equal("Bank", values["controller"]); 25Assert.Equal("DoAction", values["action"]); 26Assert.Equal("123", values["id"]); 57Assert.Equal("Bank", values["controller"]); 58Assert.Equal("DoAction", values["action"]); 59Assert.Equal("default id", values["id"]); 90Assert.Equal("111", values["p1"]); 91Assert.Equal("222", values["p2"]); 107Assert.Equal("111", values["p1"]); 108Assert.Equal("default p2", values["p2"]); 165Assert.Equal(p1, values["p1"]); 169Assert.Equal(p2, values["p2"]); 198Assert.Equal(p1, values["p1"]); 202Assert.Equal(p2, values["p2"]); 207Assert.Equal(p3, values["p3"]); 314Assert.Equal("moo", values["p1"]); 315Assert.Equal("bar", values["p2"]); 399Assert.Equal("v1", values["p1"]); 400Assert.Null(values["p2"]); 401Assert.Equal("bar", values["foo"]); 420Assert.Equal("blog", values["controller"]); 421Assert.Equal("showpost", values["action"]); 422Assert.Equal("2007", values["y"]); 423Assert.Equal("08", values["m"]); 424Assert.Null(values["d"]); 708Assert.Equal("v1", values["p1"]); 709Assert.Equal("v2/v3", values["p2"]); 726Assert.Equal("v1", values["p1"]); 727Assert.Null(values["p2"]); 744Assert.Equal("v1", values["p1"]); 745Assert.Null(values["p2"]); 762Assert.Equal("v1", values["p1"]); 763Assert.Equal("hello", values["p2"]); 780Assert.Equal("v1", values["p1"]); 781Assert.Equal("catchall", values["p2"]); 798Assert.Equal("v1", values["p1"]); 799Assert.Equal("hello/whatever", values["p2"]); 911Assert.Equal("Home", values["controller"]); 912Assert.Equal("Index", values["action"]); 930Assert.Equal("Home", values["controller"]); 984Assert.Equal("Home", values["controller"]); 985Assert.Equal("Index", values["action"]); 1124Assert.Equal(expected[key], values[key]);
RouteCollectionTest.cs (1)
156Assert.Equal(dataToken.Value, pathData.DataTokens[dataToken.Key]);
RouterMiddlewareTest.cs (2)
44Assert.Equal("10", routingFeature.RouteData.Values["id"]); 45Assert.Equal("10", context.Request.RouteValues["id"]);
RouteTest.cs (27)
96Assert.Equal("USA", context.RouteData.Values["country"]); 98Assert.Equal("5", context.RouteData.Values["id"]); 101Assert.Equal("Contoso", context.RouteData.DataTokens["company"]); 102Assert.Equal("Friday", context.RouteData.DataTokens["today"]); 157Assert.Equal("USA", context.RouteData.Values["country"]); 159Assert.Equal("5", context.RouteData.Values["id"]); 161Assert.Equal("Contoso", context.RouteData.DataTokens["company"]); 162Assert.Equal("Friday", context.RouteData.DataTokens["today"]); 204Assert.Equal("5", context.RouteData.Values["id"]); 246Assert.Equal("123-456-7890", context.RouteData.Values["ssn"]); 338Assert.Equal("5", context.RouteData.Values["id"]); 392Assert.Equal("Home", context.RouteData.Values["controller"]); 393Assert.Equal("Index", context.RouteData.Values["action"]); 424Assert.Equal("Home", context.RouteData.Values["controller"]); 425Assert.Equal("Index", context.RouteData.Values["action"]); 511Assert.Null(context.RouteData.Values["1controller"]); 527Assert.Equal("Home", context.RouteData.Values["controller"]); 528Assert.Equal("Create", context.RouteData.Values["action"]); 529Assert.Equal("xml", context.RouteData.Values["format"]); 545Assert.Equal("Home", context.RouteData.Values["controller"]); 546Assert.Equal("Create", context.RouteData.Values["action"]); 562Assert.Equal("Home", context.RouteData.Values["controller"]); 563Assert.Equal("Create", context.RouteData.Values["action"]); 564Assert.Equal("xml", context.RouteData.Values["format"]); 792Assert.Equal(dataToken.Value, pathData.DataTokens[dataToken.Key]); 831Assert.Equal(dataToken.Value, pathData.DataTokens[dataToken.Key]); 1582Assert.Equal(expectedDictionary[expectedKey], templateRoute.DataTokens[expectedKey]);
Template\TemplateMatcherTests.cs (43)
23Assert.Equal("Bank", values["controller"]); 24Assert.Equal("DoAction", values["action"]); 25Assert.Equal("123", values["id"]); 56Assert.Equal("Bank", values["controller"]); 57Assert.Equal("DoAction", values["action"]); 58Assert.Equal("default id", values["id"]); 89Assert.Equal("111", values["p1"]); 90Assert.Equal("222", values["p2"]); 106Assert.Equal("111", values["p1"]); 107Assert.Equal("default p2", values["p2"]); 164Assert.Equal(p1, values["p1"]); 168Assert.Equal(p2, values["p2"]); 197Assert.Equal(p1, values["p1"]); 201Assert.Equal(p2, values["p2"]); 206Assert.Equal(p3, values["p3"]); 313Assert.Equal("moo", values["p1"]); 314Assert.Equal("bar", values["p2"]); 398Assert.Equal("v1", values["p1"]); 399Assert.Null(values["p2"]); 400Assert.Equal("bar", values["foo"]); 419Assert.Equal("blog", values["controller"]); 420Assert.Equal("showpost", values["action"]); 421Assert.Equal("2007", values["y"]); 422Assert.Equal("08", values["m"]); 423Assert.Null(values["d"]); 707Assert.Equal("v1", values["p1"]); 708Assert.Equal("v2/v3", values["p2"]); 725Assert.Equal("v1", values["p1"]); 726Assert.Null(values["p2"]); 743Assert.Equal("v1", values["p1"]); 744Assert.Null(values["p2"]); 761Assert.Equal("v1", values["p1"]); 762Assert.Equal("hello", values["p2"]); 779Assert.Equal("v1", values["p1"]); 780Assert.Equal("catchall", values["p2"]); 797Assert.Equal("v1", values["p1"]); 798Assert.Equal("hello/whatever", values["p2"]); 910Assert.Equal("Home", values["controller"]); 911Assert.Equal("Index", values["action"]); 929Assert.Equal("Home", values["controller"]); 983Assert.Equal("Home", values["controller"]); 984Assert.Equal("Index", values["action"]); 1123Assert.Equal(expected[key], values[key]);
TemplateParserDefaultValuesTests.cs (2)
31Assert.Equal("12", defaults["id"]); 50Assert.Equal(value, defaults["p1"]);
Tree\TreeRouterTest.cs (24)
56Assert.Equal(expectedRouteGroup, context.RouteData.Values["test_route_group"]); 117Assert.Equal(expectedRouteGroup, context.RouteData.Values["test_route_group"]); 164Assert.Equal(expectedRouteGroup, context.RouteData.Values["test_route_group"]); 216Assert.Equal(expectedRouteGroup, context.RouteData.Values["test_route_group"]); 259Assert.Equal(expectedRouteGroup, context.RouteData.Values["test_route_group"]); 394Assert.Equal(expectedRouteGroup, context.RouteData.Values["test_route_group"]); 541Assert.Equal(expectedResult, context.RouteData.Values["path"]); 563Assert.Null(context.RouteData.Values["path"]); 586Assert.Equal("existing-value", context.RouteData.Values["path"]); 609Assert.Equal("default", context.RouteData.Values["path"]); 638Assert.Equal(expectedRouteGroup, context.RouteData.Values["test_route_group"]); 666Assert.Equal(expectedRouteGroup, context.RouteData.Values["test_route_group"]); 695Assert.Equal(expectedRouteGroup, context.RouteData.Values["test_route_group"]); 745Assert.Equal(p1, context.RouteData.Values["p1"]); 749Assert.Equal(p2, context.RouteData.Values["p2"]); 753Assert.Equal(p3, context.RouteData.Values["p3"]); 1712Assert.Equal("Bar", context.RouteData.Values["path"]); 1732Assert.Equal("default", context.RouteData.Values["path"]); 1805Assert.Equal("Index", context.RouteData.Values["action"]); 1806Assert.Equal("Index", nestedValues["action"]); 1847Assert.Equal("Index", context.RouteData.Values["action"]); 1848Assert.Equal("Index", nestedValues["action"]); 1891Assert.Equal("examplecategory", nestedValues["category2"]); 1892Assert.Equal("exampleproduct", nestedValues["product"]);
Microsoft.AspNetCore.StaticAssets (1)
Development\StaticAssetDevelopmentRuntimeHandler.cs (1)
314if (values[routeKey] is not string path)
Mvc.RoutingWebSite (3)
StartupForDynamic.cs (2)
51var kvps = ((string)values["slug"]).Split(","); 68if (version == "V2" && version == (string)values["version"])
StartupForDynamicAndRazorPages.cs (1)
37if (!(values["slug"] is string slug))
RoutingSandbox (1)
UseRouterStartup.cs (1)
28routes.MapGet("api/get/{id}", (request, response, routeData) => response.WriteAsync($"API Get {routeData.Values["id"]}"))
RoutingWebSite (4)
EndsWithStringRouteConstraint.cs (1)
19var value = values[routeKey];
UseEndpointRoutingStartup.cs (1)
161endpoints.MapGet("api/get/{id}", (context) => context.Response.WriteAsync($"{name} - API Get {context.Request.RouteValues["id"]}"));
UseRouterStartup.cs (2)
28routes.MapGet("api/get/{id}", (request, response, routeData) => response.WriteAsync($"API Get {routeData.Values["id"]}")) 45routes.MapGet("api/get/{id}", (request, response, routeData) => response.WriteAsync($"{name} - API Get {routeData.Values["id"]}"));