1 override of RouteValues
Microsoft.AspNetCore.Http (1)
Internal\DefaultHttpRequest.cs (1)
166public override RouteValueDictionary RouteValues
40 writes to RouteValues
DeveloperExceptionPageSample (1)
Startup.cs (1)
19context.Request.RouteValues = new RouteValueDictionary(new
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (8)
JsonTranscodingRouteAdapterTests.cs (8)
39httpContext.Request.RouteValues = new RouteValueDictionary 139httpContext.Request.RouteValues = new RouteValueDictionary 158httpContext.Request.RouteValues = new RouteValueDictionary 177httpContext.Request.RouteValues = new RouteValueDictionary 196httpContext.Request.RouteValues = new RouteValueDictionary 215httpContext.Request.RouteValues = new RouteValueDictionary 252httpContext.Request.RouteValues = new RouteValueDictionary 271httpContext.Request.RouteValues = new RouteValueDictionary
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateFactoryTests.cs (1)
255httpContext.Request.RouteValues = new()
Microsoft.AspNetCore.Http.Tests (1)
Internal\DefaultHttpRequestTests.cs (1)
217request.RouteValues = new RouteValueDictionary(new { key = "value" });
Microsoft.AspNetCore.Mvc.Core.Test (3)
Routing\ControllerLinkGeneratorExtensionsTest.cs (1)
233httpContext.Request.RouteValues = new RouteValueDictionary(ambientValues);
Routing\EndpointRoutingUrlHelperTest.cs (1)
56urlHelper.ActionContext.HttpContext.Request.RouteValues = new RouteValueDictionary
Routing\PageLinkGeneratorExtensionsTest.cs (1)
203httpContext.Request.RouteValues = new RouteValueDictionary(ambientValues);
Microsoft.AspNetCore.OutputCaching.Tests (4)
OutputCacheAttributeTests.cs (1)
109context.HttpContext.Request.RouteValues = new Routing.RouteValueDictionary()
OutputCachePolicyBuilderTests.cs (3)
140context.HttpContext.Request.RouteValues = new Routing.RouteValueDictionary() 160context.HttpContext.Request.RouteValues = new Routing.RouteValueDictionary() 180context.HttpContext.Request.RouteValues = new Routing.RouteValueDictionary()
Microsoft.AspNetCore.Routing (5)
Matching\DefaultEndpointSelector.cs (2)
40httpContext.Request.RouteValues = state.Values!; 103httpContext.Request.RouteValues = values!;
Matching\HttpMethodMatcherPolicy.cs (1)
153httpContext.Request.RouteValues = null!;
Matching\NegotiationMatcherPolicy.cs (1)
141httpContext.Request.RouteValues = null!;
RouterMiddleware.cs (1)
61httpContext.Request.RouteValues = context.RouteData.Values;
Microsoft.AspNetCore.Routing.Microbenchmarks (6)
EndpointRoutingBenchmarkBase.cs (1)
130context.Request.RouteValues = new RouteValueDictionary(ambientValues);
Matching\TrivialMatcher.cs (1)
31httpContext.Request.RouteValues = new RouteValueDictionary();
src\Http\Routing\test\UnitTests\Matching\BarebonesMatcher.cs (2)
30httpContext.Request.RouteValues = new RouteValueDictionary(); 118httpContext.Request.RouteValues = new RouteValueDictionary();
src\Http\Routing\test\UnitTests\Matching\RouteMatcher.cs (1)
27httpContext.Request.RouteValues = routeContext.RouteData.Values;
src\Http\Routing\test\UnitTests\Matching\TreeRouterMatcher.cs (1)
28httpContext.Request.RouteValues = routeContext.RouteData.Values;
Microsoft.AspNetCore.Routing.Tests (11)
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (1)
202httpContext.Request.RouteValues = new();
DefaultLinkGeneratorTest.cs (2)
634httpContext.Request.RouteValues = new RouteValueDictionary(new { controller = "Home", action = "Index" }); 673httpContext.Request.RouteValues = new RouteValueDictionary(new { controller = "Home", action = "Index", });
LinkGeneratorEndpointNameExtensionsTest.cs (1)
27httpContext.Request.RouteValues = new RouteValueDictionary(new { p = "5", });
LinkGeneratorRouteValuesAddressExtensionsTest.cs (1)
33httpContext.Request.RouteValues = new RouteValueDictionary(new { action = "Index", });
LinkGeneratorTestBase.cs (1)
17httpContext.Request.RouteValues = new RouteValueDictionary(ambientValues);
Matching\BarebonesMatcher.cs (2)
30httpContext.Request.RouteValues = new RouteValueDictionary(); 118httpContext.Request.RouteValues = new RouteValueDictionary();
Matching\RouteMatcher.cs (1)
27httpContext.Request.RouteValues = routeContext.RouteData.Values;
Matching\TreeRouterMatcher.cs (1)
28httpContext.Request.RouteValues = routeContext.RouteData.Values;
TestObjects\TestMatcher.cs (1)
20c.Request.RouteValues = new RouteValueDictionary(new { controller = "Home", action = "Index" });
110 references to RouteValues
HttpAbstractions.SampleApp (2)
Program.cs (2)
28request.RouteValues.Add("Param1", "Value1"); 29request.RouteValues.Add("Param2", "Value2");
Microsoft.AspNetCore.Diagnostics (1)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (1)
382RouteValues = request.RouteValues,
Microsoft.AspNetCore.Diagnostics.Tests (6)
ExceptionHandlerMiddlewareTest.cs (3)
86httpContext.Request.RouteValues["John"] = "Doe"; 91Assert.Empty(context.Request.RouteValues); 108httpContext.Request.RouteValues["John"] = "Doe";
StatusCodeMiddlewareTest.cs (3)
148Assert.Empty(context.Request.RouteValues); 158httpContext.Request.RouteValues["John"] = "Doe"; 214httpContext.Request.RouteValues["John"] = "Doe";
Microsoft.AspNetCore.Grpc.JsonTranscoding (3)
Internal\JsonRequestHelpers.cs (1)
282var routeValue = serverCallContext.HttpContext.Request.RouteValues[parameterDescriptor.Key];
Internal\JsonTranscodingRouteAdapter.cs (2)
149values[i] = context.Request.RouteValues[variableParts[i]]; 160context.Request.RouteValues[fullPath] = finalValue;
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (17)
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"]);
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.Extensions (1)
RequestDelegateFactory.cs (1)
96private static readonly MemberExpression RouteValuesExpr = Expression.Property(HttpRequestExpr, typeof(HttpRequest).GetProperty(nameof(HttpRequest.RouteValues))!);
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.Tests (9)
Internal\DefaultHttpRequestTests.cs (9)
207Assert.Empty(request.RouteValues); 210request.RouteValues["new"] = "setvalue"; 211Assert.Equal("setvalue", request.RouteValues["new"]); 219Assert.NotNull(request.RouteValues); 220Assert.Equal("value", request.RouteValues["key"]); 223Assert.Equal(routeValuesFeature.RouteValues, request.RouteValues); 227Assert.Empty(request.RouteValues); 235Assert.Equal(customRouteValuesFeature.RouteValues, request.RouteValues); 239Assert.Empty(request.RouteValues);
Microsoft.AspNetCore.Mvc.Core (4)
FromRouteAttribute.cs (1)
34/// The <see cref="HttpRequest.RouteValues"/> name.
Routing\ActionEndpointFactory.cs (1)
531routeData.PushState(router: null, context.Request.RouteValues, new RouteValueDictionary(dataTokens?.DataTokens));
Routing\ControllerRequestDelegateFactory.cs (2)
74routeData = new RouteData(context.Request.RouteValues); 79routeData.PushState(router: null, context.Request.RouteValues, dataTokens);
Microsoft.AspNetCore.Mvc.RazorPages (2)
Infrastructure\PageRequestDelegateFactory.cs (2)
86routeData = new RouteData(context.Request.RouteValues); 91routeData.PushState(router: null, context.Request.RouteValues, dataTokens);
Microsoft.AspNetCore.OpenApi.Tests (2)
Extensions\OpenApiEndpointRouteBuilderExtensionsTests.cs (2)
61context.Request.RouteValues.Add("documentName", "v1"); 123context.Request.RouteValues.Add("documentName", "v2");
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 (2)
Matching\EndpointSelector.cs (1)
24/// and setting <see cref="HttpRequest.RouteValues"/> once an endpoint is selected.
Matching\IEndpointSelectorPolicy.cs (1)
42/// and setting <see cref="HttpRequest.RouteValues"/> to an
Microsoft.AspNetCore.Routing.Abstractions (1)
RoutingHttpContextExtensions.cs (1)
26return routingFeature?.RouteData ?? new RouteData(httpContext.Request.RouteValues);
Microsoft.AspNetCore.Routing.Microbenchmarks (1)
EndpointRoutingBenchmarkBase.cs (1)
132return (context, context.Request.RouteValues);
Microsoft.AspNetCore.Routing.Tests (24)
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";
Matching\DfaMatcherTest.cs (7)
158httpContext.Request.RouteValues.OrderBy(kvp => kvp.Key), 223httpContext.Request.RouteValues.OrderBy(kvp => kvp.Key), 271Assert.Equal("TestAction", httpContext.Request.RouteValues["action"]); 272Assert.Equal("TestController", httpContext.Request.RouteValues["controller"]); 273Assert.Equal("17", httpContext.Request.RouteValues["id"]); 341httpContext.Request.RouteValues.OrderBy(kvp => kvp.Key), 601httpContext.Request.RouteValues.OrderBy(kvp => kvp.Key),
Matching\MatcherAssert.cs (2)
66var actualValues = httpContext.Request.RouteValues; 100$"but matched with values: {FormatRouteValues(httpContext.Request.RouteValues)}.");
RouterMiddlewareTest.cs (3)
41Assert.Single(context.Request.RouteValues); 43Assert.True(context.Request.RouteValues.ContainsKey("id")); 45Assert.Equal("10", context.Request.RouteValues["id"]);
RoutingWebSite (1)
UseEndpointRoutingStartup.cs (1)
161endpoints.MapGet("api/get/{id}", (context) => context.Response.WriteAsync($"{name} - API Get {context.Request.RouteValues["id"]}"));