1 override of Query
Microsoft.AspNetCore.Http (1)
Internal\DefaultHttpRequest.cs (1)
121public override IQueryCollection Query
77 writes to Query
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (22)
UnaryServerCallHandlerTests.cs (22)
205httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 243httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 290httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 340httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 390httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 440httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 490httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 524httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 552httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 583httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 619httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 650httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 676httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 703httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1325httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1492httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1520httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1603httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1620httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1664httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1759httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1793httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>
Microsoft.AspNetCore.Http.Connections.Tests (18)
HttpConnectionDispatcherTests.cs (18)
232context.Request.Query = qs; 312context.Request.Query = qs; 354context.Request.Query = qs; 392context.Request.Query = qs; 431context.Request.Query = qs; 471context.Request.Query = qs; 534context.Request.Query = qs; 602context.Request.Query = qs; 665context.Request.Query = qs; 770context.Request.Query = qs; 911context.Request.Query = qs; 1846context.Request.Query = qs; 1898context.Request.Query = qs; 2574context.Request.Query = qs; 2634context.Request.Query = qs; 2691context.Request.Query = qs; 3703context.Request.Query = qs; 3744context.Request.Query = qs;
Microsoft.AspNetCore.Http.Extensions.Tests (30)
RequestDelegateFactoryTests.cs (13)
251httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 582httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 604httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 628httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 753httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>() 1777httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1807httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1837httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1865httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1905httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 2160httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 2197httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 3107httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>
RequestDelegateGenerator\RequestDelegateCreationTests.Arrays.cs (2)
172httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 760httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>
RequestDelegateGenerator\RequestDelegateCreationTests.AsParameters.cs (1)
68httpContext.Request.Query = query;
RequestDelegateGenerator\RequestDelegateCreationTests.cs (6)
431httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 457httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 504httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 529httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 554httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 584httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>
RequestDelegateGenerator\RequestDelegateCreationTests.Filters.cs (5)
62httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 141httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 183httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 299httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 340httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>
RequestDelegateGenerator\RequestDelegateCreationTests.Logging.cs (1)
186httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>()
RequestDelegateGenerator\RequestDelegateCreationTests.QueryParameters.cs (1)
54httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>
RequestDelegateGenerator\RequestDelegateCreationTests.TryParse.cs (1)
278httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>
Microsoft.AspNetCore.Http.Tests (1)
Internal\DefaultHttpRequestTests.cs (1)
157request.Query = query2;
Microsoft.AspNetCore.Mvc.Core.Test (2)
ModelBinding\JQueryQueryStringValueProviderFactoryTest.cs (1)
117context.Request.Query = new QueryCollection(queryStringValues);
ModelBinding\QueryStringValueProviderFactoryTest.cs (1)
36context.Request.Query = new QueryCollection(queryValues);
Microsoft.AspNetCore.Routing.Tests (4)
Builder\RequestDelegateEndpointRouteBuilderExtensionsTest.cs (1)
249httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (3)
160httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 198httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>() 580httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>
116 references to Query
Aspire.Dashboard (2)
Model\ValidateTokenMiddleware.cs (2)
37else if (context.Request.Query.TryGetValue("t", out var value) && _options.CurrentValue.Frontend.AuthMode == FrontendAuthMode.BrowserToken) 71if (context.Request.Query.TryGetValue("returnUrl", out var returnUrl))
BasicWebSite (2)
Filters\TestExceptionFilter.cs (1)
13if (context.HttpContext.Request.Query.TryGetValue("handleException", out var handleException))
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
27var query = _actionContext.HttpContext.Request.Query;
ControllersFromServicesClassLibrary (1)
QueryValueService.cs (1)
19return _context.Request.Query["value"];
GenericHostWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
27var query = _actionContext.HttpContext.Request.Query;
HotAddSample (2)
Startup.cs (2)
39var toAdd = context.Request.Query["add"]; 65var toRemove = context.Request.Query["remove"];
InMemory.FunctionalTests (1)
RequestTests.cs (1)
238queryTcs.TrySetResult(context.Request.Query);
InProcessWebSite (8)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (8)
218await ctx.Response.WriteAsync(Environment.GetEnvironmentVariable(ctx.Request.Query["name"].ToString())); 223var varName = ctx.Request.Query["q"]; 224var newValue = ctx.Request.Query["v"]; 393feature.ReasonPhrase = ctx.Request.Query["reason"]; 394feature.StatusCode = int.Parse(ctx.Request.Query["code"], CultureInfo.InvariantCulture); 395if (ctx.Request.Query["writeBody"] == "True") 397await ctx.Response.WriteAsync(ctx.Request.Query["body"]); 419if (int.TryParse(ctx.Request.Query["length"], out var length))
JwtSample (3)
Startup.cs (3)
47var accessToken = context.Request.Query["access_token"]; 52context.Token = context.Request.Query["access_token"]; 79var claims = new[] { new Claim(ClaimTypes.NameIdentifier, httpContext.Request.Query["user"]) };
Microsoft.AspNetCore.Authentication.Cookies (2)
CookieAuthenticationEvents.cs (1)
107return string.Equals(request.Query[HeaderNames.XRequestedWith], "XMLHttpRequest", StringComparison.Ordinal) ||
CookieAuthenticationHandler.cs (1)
433redirectUri = Request.Query[Options.ReturnUrlParameter];
Microsoft.AspNetCore.Authentication.OAuth (1)
OAuthHandler.cs (1)
66var query = Request.Query;
Microsoft.AspNetCore.Authentication.OpenIdConnect (3)
OpenIdConnectHandler.cs (3)
112message = new OpenIdConnectMessage(Request.Query.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray()))); 316var message = new OpenIdConnectMessage(Request.Query.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray()))); 643authorizationResponse = new OpenIdConnectMessage(Request.Query.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray())));
Microsoft.AspNetCore.Authentication.Test (2)
CookieTests.cs (2)
1111var expectRenew = string.Equals("1", context.Request.Query["expectrenew"]); 1112var renew = string.Equals("1", context.Request.Query["renew"]);
Microsoft.AspNetCore.Authentication.Twitter (1)
TwitterHandler.cs (1)
60var query = Request.Query;
Microsoft.AspNetCore.Authentication.WsFederation (2)
WsFederationHandler.cs (2)
71&& string.Equals(Request.Query[WsFederationConstants.WsFederationParameterNames.Wa], 474var message = new WsFederationMessage(Request.Query.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray())));
Microsoft.AspNetCore.Components.Endpoints (1)
Builder\OpaqueRedirection.cs (1)
68if (!httpContext.Request.Query.TryGetValue("url", out var protectedUrl))
Microsoft.AspNetCore.Components.WebAssembly.Server (2)
TargetPickerUi.cs (2)
115var targetApplicationUrl = request.Query["url"]; 268var targetApplicationUrl = request.Query["url"];
Microsoft.AspNetCore.Diagnostics (1)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (1)
379Query = request.Query,
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Internal\JsonRequestHelpers.cs (1)
289foreach (var item in serverCallContext.HttpContext.Request.Query)
Microsoft.AspNetCore.Http.Connections (3)
Internal\HttpConnectionDispatcher.cs (3)
341if (context.Request.Query.TryGetValue("NegotiateVersion", out var queryStringVersion)) 368if (options.AllowStatefulReconnects == true && context.Request.Query.TryGetValue("UseStatefulReconnect", out var useStatefulReconnectValue)) 447private static StringValues GetConnectionToken(HttpContext context) => context.Request.Query["id"];
Microsoft.AspNetCore.Http.Connections.Tests (9)
HttpConnectionDispatcherTests.cs (9)
816Assert.Equal(3, connectionHttpContext.Request.Query.Count); 817Assert.Equal("value", connectionHttpContext.Request.Query["another"]); 3220var accessToken = context.Request.Query["access_token"]; 3225context.Token = context.Request.Query["access_token"]; 3242var claims = new[] { new Claim(ClaimTypes.NameIdentifier, httpContext.Request.Query["user"]) }; 3306new Claim(ClaimTypes.NameIdentifier, context.Request.Query["user"]) 3382var accessToken = context.Request.Query["access_token"]; 3387context.Token = context.Request.Query["access_token"]; 3404var claims = new[] { new Claim(ClaimTypes.NameIdentifier, httpContext.Request.Query["user"]) };
Microsoft.AspNetCore.Http.Extensions (1)
RequestDelegateFactory.cs (1)
97private static readonly MemberExpression QueryExpr = Expression.Property(HttpRequestExpr, typeof(HttpRequest).GetProperty(nameof(HttpRequest.Query))!);
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\SharedTypes.cs (1)
1107return new BindableStruct(httpContext.Request.Query["value"].ToString());
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\SharedTypes.cs (1)
1107return new BindableStruct(httpContext.Request.Query["value"].ToString());
Microsoft.AspNetCore.Http.Tests (3)
Internal\DefaultHttpRequestTests.cs (3)
141var query0 = request.Query; 146var query1 = request.Query; 158Assert.Same(query2, request.Query);
Microsoft.AspNetCore.Identity.FunctionalTests (1)
MapIdentityApiTests.cs (1)
250context.Token = (string?)context.Request.Query["accessToken"];
Microsoft.AspNetCore.Localization (2)
QueryStringRequestCultureProvider.cs (2)
42queryCulture = request.Query[QueryStringKey]; 47queryUICulture = request.Query[UIQueryStringKey];
Microsoft.AspNetCore.Mvc.Core (3)
Formatters\FormatFilter.cs (1)
46var query = context.HttpContext.Request.Query["format"];
ModelBinding\JQueryQueryStringValueProviderFactory.cs (1)
20var query = context.ActionContext.HttpContext.Request.Query;
ModelBinding\QueryStringValueProviderFactory.cs (1)
21var query = context.ActionContext.HttpContext.Request.Query;
Microsoft.AspNetCore.Mvc.Core.Test (9)
Formatters\FormatFilterTest.cs (9)
69httpContext.Setup(c => c.Request.Query.ContainsKey("format")).Returns(true); 70httpContext.Setup(c => c.Request.Query["format"]).Returns("xml"); 329httpContext.Setup(c => c.Request.Query["format"]).Returns("json"); 366httpContext.Setup(c => c.Request.Query["format"]).Returns("json"); 401httpContext.Setup(c => c.Request.Query.ContainsKey("format")).Returns(false); 436httpContext.Setup(c => c.Request.Query.ContainsKey("format")).Returns(false); 441httpContext.Setup(c => c.Request.Query.ContainsKey("format")).Returns(true); 442httpContext.Setup(c => c.Request.Query["format"]).Returns(format); 446httpContext.Setup(c => c.Request.Query.ContainsKey("format")).Returns(false);
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (2)
XmlDataContractSerializerOutputFormatterTest.cs (1)
832if (request.Query["indent"] == "True")
XmlSerializerOutputFormatterTest.cs (1)
622if (request.Query["indent"] == "True")
Microsoft.AspNetCore.Mvc.RazorPages (1)
Infrastructure\DefaultPageHandlerMethodSelector.cs (1)
155if (context.HttpContext.Request.Query.TryGetValue(Handler, out var queryValues))
Microsoft.AspNetCore.Mvc.TagHelpers (1)
Cache\CacheTagKey.cs (1)
90_queries = ExtractCollection(tagHelper.VaryByQuery, request.Query, QueryAccessor);
Microsoft.AspNetCore.ResponseCaching (2)
ResponseCachingKeyProvider.cs (2)
135var queryArray = context.HttpContext.Request.Query.ToArray(); 164var queryKeyValues = context.HttpContext.Request.Query[queryKey];
Microsoft.AspNetCore.ResponseCaching.Tests (2)
TestUtils.cs (2)
36var expires = context.Request.Query["Expires"]; 58var contentLength = context.Request.Query["ContentLength"];
Microsoft.AspNetCore.SignalR.Tests (4)
HubConnectionHandlerTestUtils\Hubs.cs (1)
1461string id = Context.GetHttpContext()?.Request.Query["client"] ?? string.Empty;
Startup.cs (3)
56var accessToken = context.Request.Query["access_token"]; 61context.Token = context.Request.Query["access_token"]; 107var claims = new[] { new Claim(ClaimTypes.NameIdentifier, httpContext.Request.Query["user"]) };
Microsoft.AspNetCore.Tests (1)
WebApplicationTests.cs (1)
2861var username = Request.Query["username"];
Mvc.Api.Analyzers.Test (1)
TestFiles\ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzerIntegrationTest\NoDiagnosticsAreReturned_ForApiActionsCheckingAdditionalConditions.cs (1)
12if (!ModelState.IsValid && !Request.Query.ContainsKey("skip-validation"))
Mvc.RoutingWebSite (13)
Controllers\LG1Controller.cs (11)
19return _linkGenerator.GetPathByAction(HttpContext, values: QueryToRouteValues(HttpContext.Request.Query)); 27values: QueryToRouteValues(HttpContext.Request.Query)); 36values: QueryToRouteValues(HttpContext.Request.Query)); 41var values = QueryToRouteValues(HttpContext.Request.Query); 56values: QueryToRouteValues(HttpContext.Request.Query)); 64values: QueryToRouteValues(HttpContext.Request.Query)); 69var values = QueryToRouteValues(HttpContext.Request.Query); 84values: QueryToRouteValues(HttpContext.Request.Query), 93values: QueryToRouteValues(HttpContext.Request.Query)); 103values: QueryToRouteValues(HttpContext.Request.Query), 109var values = QueryToRouteValues(HttpContext.Request.Query);
QueryStringConstraint.cs (1)
10return httpContext.Request.Query["allowed"].ToString() == "true";
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
27var query = _actionContext.HttpContext.Request.Query;
OpenIdConnectSample (1)
Startup.cs (1)
198await res.WriteAsync($"<h1>Access Denied for user {HtmlEncode(context.User.Identity.Name)} to resource '{HtmlEncode(context.Request.Query["ReturnUrl"])}'</h1>");
RazorPagesWebSite (2)
Pages\ShortCircuitPageAtAuthFilter.cshtml.cs (1)
21return httpContext.Request.Query.TryGetValue("target", out var expectedTargetName)
Pages\ShortCircuitPageAtPageFilter.cshtml.cs (1)
21return httpContext.Request.Query.TryGetValue("target", out var expectedTargetName)
SignalR.Client.FunctionalTestApp (3)
Startup.cs (2)
88token = context.Request.Query["access_token"]; 170var newUrl = context.Request.Query["baseUrl"] + "/testHub?numRedirects=" + Interlocked.Increment(ref _numRedirects);
TestHub.cs (1)
42return int.Parse(Context.GetHttpContext().Request.Query["numRedirects"], CultureInfo.InvariantCulture);
SignalRSamples (6)
Hubs\Chat.cs (2)
12var name = Context.GetHttpContext().Request.Query["name"]; 18var name = Context.GetHttpContext().Request.Query["name"];
Hubs\DynamicChat.cs (2)
12var name = Context.GetHttpContext().Request.Query["name"]; 18var name = Context.GetHttpContext().Request.Query["name"];
Hubs\HubTChat.cs (2)
12var name = Context.GetHttpContext().Request.Query["name"]; 18var name = Context.GetHttpContext().Request.Query["name"];
SocialSample (2)
Startup.cs (2)
250var authType = context.Request.Query["authscheme"]; 416await response.WriteAsync("An remote failure has occurred: " + context.Request.Query["FailureMessage"] + "<br>");
SocialWeather (1)
PersistentConnectionLifeTimeManager.cs (1)
23var format = connection.GetHttpContext().Request.Query["formatType"].ToString();
StatusCodePagesSample (2)
Startup.cs (2)
35var requestedStatusCode = context.Request.Query["statuscode"]; 42var disableStatusCodePages = context.Request.Query["disableStatusCodePages"];
VersioningWebSite (2)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
27var query = _actionContext.HttpContext.Request.Query;
VersionRangeValidator.cs (1)
23return request.Query["version"];
WsFedSample (1)
Startup.cs (1)
82await context.Response.WriteAsync($"<h1>Access Denied for user {HtmlEncode(context.User.Identity.Name)} to resource '{HtmlEncode(context.Request.Query["ReturnUrl"])}'</h1>");