Base:
226 references to ToString
Aspire.Dashboard (4)
Authentication\OtlpApiKey\OtlpApiKeyAuthenticationHandler.cs (2)
34if (!CompareHelpers.CompareKey(options.GetPrimaryApiKeyBytes(), apiKey.ToString())) 36if (options.GetSecondaryApiKeyBytes() is not { } secondaryBytes || !CompareHelpers.CompareKey(secondaryBytes, apiKey.ToString()))
Model\ValidateTokenMiddleware.cs (2)
40if (await TryAuthenticateAsync(value.ToString(), context, dashboardOptions).ConfigureAwait(false)) 73context.Response.Redirect(returnUrl.ToString());
Aspire.Dashboard.Tests (3)
BrowserSecurityHeadersMiddlewareTests.cs (3)
29Assert.DoesNotContain("default-src", httpContext.Response.Headers.ContentSecurityPolicy.ToString()); 44Assert.Contains("default-src", httpContext.Response.Headers.ContentSecurityPolicy.ToString()); 62Assert.Contains(expectedContent, httpContext.Response.Headers.ContentSecurityPolicy.ToString());
InMemory.FunctionalTests (20)
ChunkedRequestTests.cs (15)
251Assert.Equal("X-Trailer-Header", request.GetDeclaredTrailers().ToString()); 273Assert.Equal(string.Empty, request.GetDeclaredTrailers().ToString()); 274Assert.Equal(string.Empty, request.GetTrailer("X-Trailer-Header").ToString()); 281Assert.Equal("X-Trailer-Header", request.GetDeclaredTrailers().ToString()); 282Assert.Equal(new string('a', requestsReceived), request.GetTrailer("X-Trailer-Header").ToString()); 289Assert.Equal(string.Empty, request.GetDeclaredTrailers().ToString()); 290Assert.Equal(string.Empty, request.GetTrailer("X-Trailer-Header").ToString()); 377Assert.Equal("X-Trailer-Header", request.GetDeclaredTrailers().ToString()); 404Assert.Equal(string.Empty, request.GetDeclaredTrailers().ToString()); 405Assert.Equal(string.Empty, request.GetTrailer("X-Trailer-Header").ToString()); 412Assert.Equal("X-Trailer-Header", request.GetDeclaredTrailers().ToString()); 413Assert.Equal(new string('a', requestsReceived), request.GetTrailer("X-Trailer-Header").ToString()); 420Assert.Equal(string.Empty, request.GetDeclaredTrailers().ToString()); 421Assert.Equal(string.Empty, request.GetTrailer("X-Trailer-Header").ToString()); 596Assert.Equal(new string('a', requestsReceived), request.GetTrailer("X-Trailer-Header").ToString());
Http2\Http2TestBase.cs (3)
198_receivedHeaders[header.Key] = header.Value.ToString(); 224_receivedHeaders[header.Key] = header.Value.ToString(); 231_receivedTrailers[header.Key] = header.Value.ToString();
MaxRequestBodySizeTests.cs (1)
481Assert.Equal("trailing-value", context.Request.GetTrailer("Trailing-Header").ToString());
src\Servers\Kestrel\shared\Http2HeadersEnumerator.cs (1)
151Current = new KeyValuePair<string, string>(name, value.ToString());
InProcessWebSite (2)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (1)
218await ctx.Response.WriteAsync(Environment.GetEnvironmentVariable(ctx.Request.Query["name"].ToString()));
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.WebSockets.cs (1)
147string key = context.Request.Headers[Constants.Headers.SecWebSocketKey].ToString();
LocalizationWebsite (1)
StartupContentLanguageHeader.cs (1)
37var contentLanguage = context.Response.Headers.ContentLanguage.ToString();
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultAntiforgery.cs (1)
367CacheControlHeaderValue.TryParse(cacheControlHeader.ToString(), out var cacheControlHeaderValue))
Microsoft.AspNetCore.Antiforgery.Test (1)
DefaultAntiforgeryTest.cs (1)
367return context.HttpContext.Response.Headers[headerName].ToString();
Microsoft.AspNetCore.Authentication.JwtBearer (1)
JwtBearerHandler.cs (1)
76string authorization = Request.Headers.Authorization.ToString();
Microsoft.AspNetCore.Authentication.Negotiate (1)
NegotiateHandler.cs (1)
108var authorization = authorizationHeader.ToString();
Microsoft.AspNetCore.Authentication.OAuth (9)
OAuthHandler.cs (9)
100deniedEx.Data["error"] = error.ToString(); 101deniedEx.Data["error_description"] = errorDescription.ToString(); 102deniedEx.Data["error_uri"] = errorUri.ToString(); 119ex.Data["error"] = error.ToString(); 120ex.Data["error_description"] = errorDescription.ToString(); 121ex.Data["error_uri"] = errorUri.ToString(); 133var codeExchangeContext = new OAuthCodeExchangeContext(properties, code.ToString(), BuildRedirectUri(Options.CallbackPath)); 291Logger.HandleChallenge(location.ToString(), cookie.ToString());
Microsoft.AspNetCore.Authentication.OpenIdConnect (2)
OpenIdConnectHandler.cs (2)
377Logger.HandleChallenge(location.ToString(), cookie.ToString());
Microsoft.AspNetCore.Authentication.Test (6)
WsFederation\WsFederationTest.cs (3)
80Assert.True(queryItems["wctx"].ToString().Equals(CustomStateDataFormat.ValidStateData), "wctx does not equal ValidStateData"); 96Assert.True(queryItems["wctx"].ToString().Equals(CustomStateDataFormat.ValidStateData), "wctx does not equal ValidStateData"); 112Assert.True(queryItems["wctx"].ToString().Equals(CustomStateDataFormat.ValidStateData), "wctx does not equal ValidStateData");
WsFederation\WsFederationTest_Handler.cs (3)
78Assert.True(queryItems["wctx"].ToString().Equals(CustomStateDataFormat.ValidStateData), "wctx does not equal ValidStateData"); 94Assert.True(queryItems["wctx"].ToString().Equals(CustomStateDataFormat.ValidStateData), "wctx does not equal ValidStateData"); 110Assert.True(queryItems["wctx"].ToString().Equals(CustomStateDataFormat.ValidStateData), "wctx does not equal ValidStateData");
Microsoft.AspNetCore.Authentication.Twitter (7)
TwitterHandler.cs (7)
105var accessToken = await ObtainAccessTokenAsync(requestToken, oauthVerifier.ToString()); 285Token = Uri.UnescapeDataString(responseParameters["oauth_token"].ToString()), 286TokenSecret = Uri.UnescapeDataString(responseParameters["oauth_token_secret"].ToString()), 312Token = Uri.UnescapeDataString(responseParameters["oauth_token"].ToString()), 313TokenSecret = Uri.UnescapeDataString(responseParameters["oauth_token_secret"].ToString()), 314UserId = Uri.UnescapeDataString(responseParameters["user_id"].ToString()), 315ScreenName = Uri.UnescapeDataString(responseParameters["screen_name"].ToString()),
Microsoft.AspNetCore.Components.WebAssembly.Server (2)
TargetPickerUi.cs (2)
288{GetLaunchChromeInstructions(targetApplicationUrl.ToString())} 292{GetLaunchEdgeInstructions(targetApplicationUrl.ToString())}
Microsoft.AspNetCore.Cors (2)
Infrastructure\CorsService.cs (2)
119new[] { result.IsPreflightRequest ? headers.AccessControlRequestMethod.ToString() : context.Request.Method } : 230var originString = origin.ToString();
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (1)
MigrationsEndPointMiddleware.cs (1)
98var contextTypeName = form["context"].ToString();
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Logging\HeaderReader.cs (1)
43var redacted = provider.Redact(headerValue.ToString());
Microsoft.AspNetCore.HeaderPropagation (1)
HeaderPropagationMessageHandler.cs (1)
69var value = stringValues.ToString();
Microsoft.AspNetCore.HostFiltering (1)
HostFilteringMiddleware.cs (1)
84var host = context.Request.Headers.Host.ToString();
Microsoft.AspNetCore.Http (4)
FormFile.cs (2)
39get { return Headers.ContentDisposition.ToString(); } 48get { return Headers.ContentType.ToString(); }
Internal\DefaultHttpRequest.cs (1)
117get { return HostString.FromUriComponent(Headers.Host.ToString()); }
src\Shared\Debugger\StringValuesDictionaryDebugView.cs (1)
28keyValuePairs.Add(new DictionaryItemDebugView<string, string>(kvp.Key, kvp.Value.ToString()));
Microsoft.AspNetCore.Http.Connections (5)
Internal\HttpConnectionDispatcher.cs (5)
73_manager.TryGetConnection(connectionToken.ToString(), out connectionContext); 344var queryStringVersionValue = queryStringVersion.ToString(); 370var useStatefulReconnectStringValue = useStatefulReconnectValue.ToString(); 787if (!_manager.TryGetConnection(connectionToken.ToString(), out var connection)) 811else if (!_manager.TryGetConnection(connectionToken.ToString(), out connection))
Microsoft.AspNetCore.Http.Extensions (2)
HeaderDictionaryTypeExtensions.cs (1)
177var value = headerValue.ToString();
RequestHeaders.cs (1)
218return HostString.FromUriComponent(Headers.Host.ToString());
Microsoft.AspNetCore.Http.Extensions.Tests (2)
RequestDelegateGenerator\SharedTypes.cs (1)
1107return new BindableStruct(httpContext.Request.Query["value"].ToString());
ResponseExtensionTests.cs (1)
21Assert.Equal(string.Empty, context.Response.Headers["custom"].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.Results.Tests (3)
LocalRedirectResultTests.cs (1)
72Assert.Equal(expectedPath, httpContext.Response.Headers.Location.ToString());
src\Shared\ResultsTests\RedirectResultTestBase.cs (2)
34Assert.Equal(expectedPath, httpContext.Response.Headers.Location.ToString()); 57Assert.Equal(expectedPath, httpContext.Response.Headers.Location.ToString());
Microsoft.AspNetCore.HttpLogging (6)
HttpLoggingMiddleware.cs (1)
362logContext.AddParameter(key, value.ToString());
W3CLoggingMiddleware.cs (5)
148shouldLog |= AddToList(elements, _hostIndex, host.ToString()); 156shouldLog |= AddToList(elements, _refererIndex, referer.ToString()); 164shouldLog |= AddToList(elements, _userAgentIndex, agent.ToString()); 174shouldLog |= AddToList(elements, _cookieIndex, cookie.ToString()); 186shouldLog |= AddToList(additionalHeaderElements, i, headerValue.ToString());
Microsoft.AspNetCore.HttpOverrides (3)
CertificateForwardingFeature.cs (1)
37var certificate = _options.HeaderConverter(_header.ToString());
HttpMethodOverrideMiddleware.cs (2)
52context.Request.Method = xHttpMethodOverrideValue.ToString(); 65context.Request.Method = methodType.ToString();
Microsoft.AspNetCore.HttpOverrides.Tests (4)
ForwardedHeadersMiddlewareTest.cs (4)
141Assert.Equal(remainingHeader, context.Request.Headers["X-Forwarded-For"].ToString()); 1085Assert.Equal(remainingHeader, context.Request.Headers["X-Forwarded-Proto"].ToString()); 1122Assert.Equal(remainingHeader, context.Request.Headers["X-Forwarded-Proto"].ToString()); 1328Assert.Equal(expectedforwardedPrefix, context.Request.Headers["X-Forwarded-Prefix"].ToString());
Microsoft.AspNetCore.Mvc.Abstractions (2)
ModelBinding\ValueProviderResult.cs (2)
125return Values.ToString(); 150return result.Values.ToString();
Microsoft.AspNetCore.Mvc.Core (4)
Formatters\FormatFilter.cs (1)
49return query.ToString();
ModelBinding\Binders\HeaderModelBinder.cs (2)
115values = new[] { header.ToString() }; 131model = value.ToString();
ModelBinding\Binders\SimpleTypeModelBinder.cs (1)
56? valueProviderResult.Values.ToString()
Microsoft.AspNetCore.Mvc.Core.Test (3)
LocalRedirectResultTest.cs (1)
78Assert.Equal(expectedPath, httpContext.Response.Headers.Location.ToString());
src\Shared\ResultsTests\RedirectResultTestBase.cs (2)
34Assert.Equal(expectedPath, httpContext.Response.Headers.Location.ToString()); 57Assert.Equal(expectedPath, httpContext.Response.Headers.Location.ToString());
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
CookieTempDataProviderTest.cs (1)
90var setCookieHeader = SetCookieHeaderValue.Parse(context.Response.Headers["Set-Cookie"].ToString());
Microsoft.AspNetCore.ResponseCaching (10)
ResponseCachingContext.cs (2)
65if (HeaderUtilities.TryParseDate(HttpContext.Response.Headers.Date.ToString(), out date)) 92if (HeaderUtilities.TryParseDate(HttpContext.Response.Headers.Expires.ToString(), out expires))
ResponseCachingMiddleware.cs (7)
290_logger.VaryByRulesUpdated(normalizedVaryHeaders.ToString(), normalizedVaryQueryKeys.ToString()); 443&& EntityTagHeaderValue.TryParse(cachedResponseHeaders.ETag.ToString(), out eTag) 463if (!HeaderUtilities.TryParseDate(cachedResponseHeaders.LastModified.ToString(), out modified) && 464!HeaderUtilities.TryParseDate(cachedResponseHeaders.Date.ToString(), out modified)) 470if (HeaderUtilities.TryParseDate(ifModifiedSince.ToString(), out modifiedSince) && 487return new StringValues(stringValues.ToString().ToUpperInvariant());
ResponseCachingPolicyProvider.cs (1)
234if (HeaderUtilities.TryParseDate(context.CachedResponseHeaders.Expires.ToString(), out expires) &&
Microsoft.AspNetCore.Rewrite (1)
RewriteMiddleware.cs (1)
104httpContext.Response.Headers.Location.ToString(),
Microsoft.AspNetCore.Routing (3)
Matching\HttpMethodDictionaryPolicyJumpTable.cs (1)
26var corsHttpMethod = accessControlRequestMethod.ToString();
Matching\HttpMethodMatcherPolicy.cs (1)
124httpMethod = accessControlRequestMethod.ToString();
Matching\HttpMethodSingleEntryPolicyJumpTable.cs (1)
39return HttpMethods.Equals(accessControlRequestMethod.ToString(), _method) ? _corsPreflightDestination : _corsPreflightExitDestination;
Microsoft.AspNetCore.Server.HttpSys (7)
RequestProcessing\Request.cs (2)
215var transferEncoding = Headers[HeaderNames.TransferEncoding].ToString(); 509var transferEncoding = Headers[HeaderNames.TransferEncoding].ToString();
RequestProcessing\RequestContext.FeatureCollection.cs (2)
690if (CacheControlHeaderValue.TryParse(cacheControlHeader.ToString(), out cacheControl) && cacheControl.Public) 702if (HeaderUtilities.TryParseDate(response.Headers[HeaderNames.Expires].ToString(), out expirationDate))
RequestProcessing\Response.cs (1)
483return string.Equals(knownValue, input.ToString().Trim(), StringComparison.OrdinalIgnoreCase);
src\Shared\Debugger\StringValuesDictionaryDebugView.cs (1)
28keyValuePairs.Add(new DictionaryItemDebugView<string, string>(kvp.Key, kvp.Value.ToString()));
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
300public KeyValuePair<string, string>[] Items => _collection.Select(pair => new KeyValuePair<string, string>(pair.Key, pair.Value.ToString())).ToArray();
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (2)
RequestBodyTests.cs (2)
270Assert.Equal("", httpContext.Request.Headers[HeaderNames.ContentLength].ToString()); 282Assert.Equal("", httpContext.Request.Headers["Custom-Header"].ToString());
Microsoft.AspNetCore.Server.IIS (3)
Core\IISHttpContext.cs (1)
374string transferEncoding = RequestHeaders.TransferEncoding.ToString();
src\Shared\Debugger\StringValuesDictionaryDebugView.cs (1)
28keyValuePairs.Add(new DictionaryItemDebugView<string, string>(kvp.Key, kvp.Value.ToString()));
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
300public KeyValuePair<string, string>[] Items => _collection.Select(pair => new KeyValuePair<string, string>(pair.Key, pair.Value.ToString())).ToArray();
Microsoft.AspNetCore.Server.IISIntegration (1)
ForwardedTlsConnectionFeature.cs (1)
31var bytes = Convert.FromBase64String(_header.ToString());
Microsoft.AspNetCore.Server.Kestrel.Core (27)
Internal\Http\Http1Connection.cs (1)
603var hostText = HttpRequestHeaders.HeaderHost.ToString();
Internal\Http\HttpHeaders.cs (1)
346if (ReferenceEquals(connection.ToString(), KeepAlive))
Internal\Http\HttpHeaders.Generated.cs (13)
592_contentLength = ParseContentLength(value.ToString()); 4117_contentLength = ParseContentLength(value.ToString()); 4129_contentLength = ParseContentLength(value.ToString()); 5126_contentLength = ParseContentLength(value.ToString()); 5146_contentLength = ParseContentLength(value.ToString()); 7888var previousValue = values.ToString(); 8104var previousValue = values.ToString(); 8307var previousValue = values.ToString(); 8809_contentLength = ParseContentLength(value.ToString()); 12049_contentLength = ParseContentLength(value.ToString()); 12055_contentLength = ParseContentLength(value.ToString()); 12832_contentLength = ParseContentLength(value.ToString()); 12842_contentLength = ParseContentLength(value.ToString());
Internal\Http2\Http2Stream.cs (4)
298var headerScheme = HttpRequestHeaders.HeaderScheme.ToString(); 314var path = HttpRequestHeaders.HeaderPath.ToString(); 351_methodText = HttpRequestHeaders.HeaderMethod.ToString(); 400hostText = host.ToString();
Internal\Http3\Http3HeadersEnumerator.cs (1)
112Current = new KeyValuePair<string, string>(name, value.ToString());
Internal\Http3\Http3Stream.cs (4)
1019var headerScheme = HttpRequestHeaders.HeaderScheme.ToString(); 1035var path = HttpRequestHeaders.HeaderPath.ToString(); 1072_methodText = HttpRequestHeaders.HeaderMethod.ToString(); 1121hostText = host.ToString();
KestrelBadHttpRequestException.cs (1)
105throw GetException(reason, detail.ToString());
src\Servers\Kestrel\shared\Http2HeadersEnumerator.cs (1)
151Current = new KeyValuePair<string, string>(name, value.ToString());
src\Shared\Debugger\StringValuesDictionaryDebugView.cs (1)
28keyValuePairs.Add(new DictionaryItemDebugView<string, string>(kvp.Key, kvp.Value.ToString()));
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (14)
HttpRequestHeadersTests.cs (13)
555var prevHeaderValue = ((IHeaderDictionary)headers)[headerName].ToString(); 617var parsedHeaderValue1 = ((IHeaderDictionary)headers)[headerName].ToString(); 622var parsedHeaderValue2 = ((IHeaderDictionary)headers)[headerName].ToString(); 689var parsedAcceptHeaderValue = ((IHeaderDictionary)headers).Accept.ToString(); 690var parsedCookieHeaderValue = ((IHeaderDictionary)headers).Cookie.ToString(); 752var prevHeaderValue = ((IHeaderDictionary)headers)[headerName].ToString(); 765var nextHeaderValue = ((IHeaderDictionary)headers)[headerName].ToString(); 777nextHeaderValue = ((IHeaderDictionary)headers)[headerName].ToString(); 806Assert.NotEqual(string.Empty, prevHeaderValue.ToString()); 814var nextHeaderValue = ((IHeaderDictionary)headers)[headerName].ToString(); 825nextHeaderValue = ((IHeaderDictionary)headers)[headerName].ToString(); 854var prevHeaderValue = ((IHeaderDictionary)headers)[prevName].ToString(); 867var newHeaderValue = ((IHeaderDictionary)headers)[nextName].ToString();
src\Servers\Kestrel\shared\Http2HeadersEnumerator.cs (1)
151Current = new KeyValuePair<string, string>(name, value.ToString());
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
src\Servers\Kestrel\shared\Http2HeadersEnumerator.cs (1)
151Current = new KeyValuePair<string, string>(name, value.ToString());
Microsoft.AspNetCore.Shared.Tests (2)
src\Shared\Debugger\StringValuesDictionaryDebugView.cs (1)
28keyValuePairs.Add(new DictionaryItemDebugView<string, string>(kvp.Key, kvp.Value.ToString()));
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
300public KeyValuePair<string, string>[] Items => _collection.Select(pair => new KeyValuePair<string, string>(pair.Key, pair.Value.ToString())).ToArray();
Microsoft.AspNetCore.WebSockets (4)
HandshakeHelpers.cs (1)
26responseHeaders.SecWebSocketAccept = CreateResponseKey(requestHeaders.SecWebSocketKey.ToString());
WebSocketMiddleware.cs (3)
73if (!_allowedOrigins.Contains(originHeader.ToString(), StringComparer.Ordinal)) 77_logger.LogDebug("Request origin {Origin} is not in the list of allowed origins.", originHeader.ToString()); 280return HandshakeHelpers.IsRequestKeyValid(requestHeaders.SecWebSocketKey.ToString());
Microsoft.AspNetCore.WebSockets.Tests (5)
WebSocketMiddlewareTests.cs (5)
728Assert.Same(HeaderNames.Upgrade, context.Request.Headers.Connection.ToString()); 729Assert.Same(Constants.Headers.UpgradeWebSocket, context.Request.Headers.Upgrade.ToString()); 730Assert.Same(Constants.Headers.SupportedVersion, context.Request.Headers.SecWebSocketVersion.ToString()); 748Assert.Equal("Upgrade, keep-alive", context.Request.Headers.Connection.ToString()); 749Assert.Equal("websocket, example", context.Request.Headers.Upgrade.ToString());
Microsoft.AspNetCore.WebUtilities.Tests (33)
FormPipeReaderTests.cs (18)
21Assert.Equal("bar", formCollection[""].ToString()); 31Assert.Equal("bar", formCollection[""].ToString()); 32Assert.Equal("2", formCollection["baz"].ToString()); 42Assert.Equal("", formCollection["foo"].ToString()); 52Assert.Equal("", formCollection["foo"].ToString()); 62Assert.Equal("", formCollection["foo"].ToString()); 63Assert.Equal("2", formCollection["baz"].ToString()); 73Assert.Equal("", formCollection["foo"].ToString()); 74Assert.Equal("2", formCollection["baz"].ToString()); 96Assert.Equal("1", formCollection["foo"].ToString()); 97Assert.Equal("2", formCollection["bar"].ToString()); 98Assert.Equal("3", formCollection["baz"].ToString()); 139Assert.Equal("1", formCollection["fooooooooo"].ToString()); 140Assert.Equal("2", formCollection["bar"].ToString()); 141Assert.Equal("3,4", formCollection["baz"].ToString()); 167Assert.Equal("1", formCollection["foo"].ToString()); 168Assert.Equal("1234567890", formCollection["bar"].ToString()); 169Assert.Equal("3,4", formCollection["baz"].ToString());
FormReaderTests.cs (15)
20Assert.Equal("bar", formCollection[""].ToString()); 32Assert.Equal("bar", formCollection[""].ToString()); 33Assert.Equal("2", formCollection["baz"].ToString()); 45Assert.Equal("", formCollection["foo"].ToString()); 57Assert.Equal("", formCollection["foo"].ToString()); 58Assert.Equal("2", formCollection["baz"].ToString()); 70Assert.Equal("1", formCollection["foo"].ToString()); 71Assert.Equal("2", formCollection["bar"].ToString()); 72Assert.Equal("3", formCollection["baz"].ToString()); 109Assert.Equal("1", formCollection["foo"].ToString()); 110Assert.Equal("2", formCollection["bar"].ToString()); 111Assert.Equal("3,4", formCollection["baz"].ToString()); 136Assert.Equal("1", formCollection["foo"].ToString()); 137Assert.Equal("1234567890", formCollection["bar"].ToString()); 138Assert.Equal("3,4", formCollection["baz"].ToString());
MinimalFormSample (3)
Program.cs (3)
57var name = form["name"].ToString(); 58var dueDate = DateTime.Parse(form["dueDate"].ToString(), CultureInfo.InvariantCulture); 59var isCompleted = bool.Parse(form["isCompleted"].ToString());
Mvc.RoutingWebSite (2)
Controllers\LG1Controller.cs (1)
130return new RouteValueDictionary(query.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.ToString()));
QueryStringConstraint.cs (1)
10return httpContext.Request.Query["allowed"].ToString() == "true";
OpenIdConnectSample (1)
Startup.cs (1)
34var userAgent = httpContext.Request.Headers["User-Agent"].ToString();
SocialWeather (1)
PersistentConnectionLifeTimeManager.cs (1)
23var format = connection.GetHttpContext().Request.Query["formatType"].ToString();