1 write to Value
Microsoft.AspNetCore.Http.Abstractions (1)
QueryString.cs (1)
34Value = value;
54 references to Value
AzureAppServicesHostingStartupSample (1)
Startup.cs (1)
25await context.Response.WriteAsync("Query: " + context.Request.QueryString.Value + Environment.NewLine);
AzureAppServicesSample (1)
Startup.cs (1)
36await context.Response.WriteAsync("Query: " + context.Request.QueryString.Value + Environment.NewLine);
IISSample (1)
Startup.cs (1)
50await context.Response.WriteAsync("Query: " + context.Request.QueryString.Value + Environment.NewLine);
InMemory.FunctionalTests (3)
Http2\Http2StreamTests.cs (1)
361context.Response.Headers["query"] = context.Request.QueryString.Value;
Http3\Http3StreamTests.cs (1)
209context.Response.Headers["query"] = context.Request.QueryString.Value;
RequestTargetProcessingTests.cs (1)
104Assert.Empty(context.Request.QueryString.Value);
InProcessWebSite (4)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (4)
292Assert.Equal("?query", ctx.Request.QueryString.Value); 294Assert.Equal("", ctx.Request.QueryString.Value); 410await ctx.Response.WriteAsync(ctx.Request.QueryString.Value); 1072public Task Query(HttpContext ctx) => ctx.Response.WriteAsync(ctx.Request.QueryString.Value);
Microsoft.AspNetCore.Authentication.Test (1)
PolicyTests.cs (1)
349p.ForwardDefaultSelector = c => c.Request.QueryString.Value.Substring(1);
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
WebAssemblyNetDebugProxyAppBuilderExtensions.cs (1)
25var queryParams = HttpUtility.ParseQueryString(context.Request.QueryString.Value!);
Microsoft.AspNetCore.Diagnostics (1)
StatusCodePage\StatusCodePagesExtensions.cs (1)
185OriginalQueryString = originalQueryString.HasValue ? originalQueryString.Value : null,
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Logging\AcceptanceTests.cs (2)
65if (context.Request.QueryString.Value!.Contains("status")) 70if (context.Request.QueryString.Value!.Contains("body"))
Microsoft.AspNetCore.Diagnostics.Tests (3)
StatusCodeMiddlewareTest.cs (3)
44await httpContext.Response.WriteAsync(httpContext.Request.QueryString.Value); 108httpContext.Request.QueryString.Value 170httpContext.Request.QueryString.Value
Microsoft.AspNetCore.Hosting (4)
Internal\HostingRequestFinishedLog.cs (2)
4510 => new KeyValuePair<string, object?>(nameof(request.QueryString), request.QueryString.Value), 66_cachedToString = $"Request finished {request.Protocol} {request.Method} {request.Scheme}://{request.Host.Value}{request.PathBase.Value}{request.Path.Value}{request.QueryString.Value} - {response.StatusCode.ToString(CultureInfo.InvariantCulture)} {ValueOrEmptyMarker(response.ContentLength)} {EscapedValueOrEmptyMarker(response.ContentType)} {Elapsed.TotalMilliseconds.ToString("0.0000", CultureInfo.InvariantCulture)}ms";
Internal\HostingRequestStartingLog.cs (2)
338 => new KeyValuePair<string, object?>(nameof(_request.QueryString), _request.QueryString.Value), 48_cachedToString = $"Request starting {request.Protocol} {request.Method} {request.Scheme}://{request.Host.Value}{request.PathBase.Value}{request.Path.Value}{request.QueryString.Value} - {EscapedValueOrEmptyMarker(request.ContentType)} {ValueOrEmptyMarker(request.ContentLength)}";
Microsoft.AspNetCore.Http (2)
Internal\DefaultHttpRequest.cs (1)
82set { HttpRequestFeature.QueryString = value.Value ?? string.Empty; }
src\Shared\Debugger\HttpContextDebugFormatter.cs (1)
114sb.Append(CultureInfo.InvariantCulture, $"{scheme}://{host}{request.PathBase.Value}{request.Path.Value}{(includeQueryString ? request.QueryString.Value : string.Empty)}");
Microsoft.AspNetCore.Http.Abstractions (12)
QueryString.cs (12)
45[MemberNotNullWhen(true, nameof(Value))] 46public bool HasValue => !string.IsNullOrEmpty(Value); 68return HasValue ? Value.Replace("#", "%23") : string.Empty; 175if (!HasValue || Value.Equals("?", StringComparison.Ordinal)) 179if (!other.HasValue || other.Value.Equals("?", StringComparison.Ordinal)) 185return new QueryString(string.Concat(Value, "&", other.Value.AsSpan(1))); 199if (!HasValue || Value.Equals("?", StringComparison.Ordinal)) 204var builder = new StringBuilder(Value); 220return string.Equals(Value, other.Value, StringComparison.Ordinal); 243return (HasValue ? Value.GetHashCode() : 0);
Microsoft.AspNetCore.Http.Abstractions.Tests (10)
QueryStringTests.cs (10)
23Assert.Null(query.Value); 27Assert.Null(query.Value); 31Assert.Equal(string.Empty, query.Value); 39Assert.Equal("?", query.Value); 60Assert.Equal(expected, query.Value); 74Assert.Equal("?key1=value1&key2=value2&key3=value3&key4=&key5=", query.Value); 88Assert.Equal("?key1=value1&key2=value2&key3=value3&key4=&key5=", query.Value); 105Assert.Equal(expected, q1.Add(q2).Value); 106Assert.Equal(expected, (q1 + q2).Value); 127Assert.Equal(expected, q2.Value);
Microsoft.AspNetCore.Http.Extensions (1)
UriHelper.cs (1)
211var queryString = request.QueryString.Value ?? string.Empty;
Microsoft.AspNetCore.HttpLogging (2)
HttpLoggingMiddleware.cs (1)
135logContext.AddParameter(nameof(request.QueryString), request.QueryString.Value);
W3CLoggingMiddleware.cs (1)
139shouldLog |= AddToList(elements, _uriQueryIndex, request.QueryString.Value);
Microsoft.AspNetCore.Owin.Tests (1)
OwinEnvironmentTests.cs (1)
90Assert.Equal("?key=value", context.Request.QueryString.Value);
Microsoft.AspNetCore.Routing (1)
DefaultLinkGenerator.cs (1)
355=> TemplateSucceeded(logger, endpoint.RoutePattern.RawText, endpoint.DisplayName, path.Value, query.Value);
Microsoft.AspNetCore.TestHost.Tests (2)
ClientHandlerTests.cs (1)
55Assert.Equal("?and=query", context.Request.QueryString.Value);
HttpContextBuilderTests.cs (1)
37Assert.Equal("?and=query", context.Request.QueryString.Value);
NativeIISSample (1)
Startup.cs (1)
44await context.Response.WriteAsync("Query: " + context.Request.QueryString.Value + Environment.NewLine);