63 references to ToArray
Microsoft.AspNetCore.Authentication.Cookies (1)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
279var values = existingValues.ToArray();
Microsoft.AspNetCore.Authentication.OpenIdConnect (5)
OpenIdConnectHandler.cs (5)
112message = new OpenIdConnectMessage(Request.Query.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray()))); 127message = new OpenIdConnectMessage(form.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()))); 670authorizationResponse = new OpenIdConnectMessage(form.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray())));
Microsoft.AspNetCore.Authentication.WsFederation (2)
WsFederationHandler.cs (2)
164wsFederationMessage = new WsFederationMessage(form.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray()))); 474var message = new WsFederationMessage(Request.Query.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray())));
Microsoft.AspNetCore.Components.WebAssembly.Server.Tests (7)
ContentEncodingNegotiatorTests.cs (7)
32Assert.Contains(HeaderNames.ContentEncoding, varyHeader.ToArray()); 75Assert.Contains(HeaderNames.ContentEncoding, varyHeader.ToArray()); 98Assert.Contains(HeaderNames.ContentEncoding, varyHeader.ToArray()); 121Assert.Contains(HeaderNames.ContentEncoding, varyHeader.ToArray()); 144Assert.Contains(HeaderNames.ContentEncoding, varyHeader.ToArray()); 167Assert.Contains(HeaderNames.ContentEncoding, varyHeader.ToArray()); 210Assert.Contains(HeaderNames.ContentEncoding, varyHeader.ToArray());
Microsoft.AspNetCore.CookiePolicy.Test (5)
CookieChunkingTests.cs (4)
226}, cookies.ToArray()); 243}, cookies.ToArray()); 261}, cookies.ToArray()); 314}, httpContext.Response.Headers[HeaderNames.SetCookie].ToArray());
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
279var values = existingValues.ToArray();
Microsoft.AspNetCore.HeaderPropagation (1)
HeaderPropagationMessageHandler.cs (1)
77var values = stringValues.ToArray();
Microsoft.AspNetCore.HeaderPropagation.Tests (4)
HeaderPropagationMiddlewareTest.cs (4)
47Assert.Equal(new[] { "test" }, CapturedHeaders["in"].ToArray()); 90Assert.Equal(new[] { "test" }, CapturedHeaders["in"].ToArray()); 92Assert.Equal(new[] { "test2" }, CapturedHeaders["another"].ToArray()); 135Assert.Equal(expectedValues, CapturedHeaders["in"].ToArray());
Microsoft.AspNetCore.Http (1)
Internal\ResponseCookies.cs (1)
148var values = existingValues.ToArray();
Microsoft.AspNetCore.Http.Tests (12)
Features\QueryFeatureTests.cs (6)
87Assert.Equal(new[] { "value1", "" }, queryCollection[""].ToArray()); 101Assert.Equal(new[] { "valueA", "valueC" }, queryCollection["key1"].ToArray()); 116Assert.Equal(new[] { "valueA", "valueC", "valueD" }, queryCollection["key1"].ToArray()); 218Assert.Equal(new[] { "[ 1 ]", "[ 2 ]" }, queryCollection["fields [todoItems]"].ToArray()); 237Assert.Equal(new[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" }, queryCollection["KEY"].ToArray()); 252Assert.Equal(new[] { "1", "2", "3", "4", "5" }, queryCollection["KEY"].ToArray());
HeaderDictionaryTests.cs (2)
34Assert.Equal(new[] { "Value1" }, headers["header1"].ToArray()); 84Assert.Equal(new[] { "Value1" }, headers["header1"].ToArray());
Internal\DefaultHttpRequestTests.cs (2)
183Assert.Equal(newCookies, request.Headers["Cookie"].ToArray()); 193Assert.Equal(new[] { "name2=value2" }, cookieHeaders.ToArray());
ResponseCookiesTest.cs (2)
137var deletedCookies = headers.SetCookie.ToArray(); 168var deletedCookies = headers.SetCookie.ToArray();
Microsoft.AspNetCore.Mvc.Abstractions (2)
ModelBinding\ModelStateDictionary.cs (1)
505rawValue = valueProviderResult.Values.ToArray();
ModelBinding\ValueProviderResult.cs (1)
162return result.Values.ToArray();
Microsoft.AspNetCore.Mvc.Abstractions.Test (1)
ModelBinding\ValueProviderResultTest.cs (1)
79Assert.Equal(new string[] { "Hi", "There" }, result.Values.ToArray());
Microsoft.AspNetCore.Mvc.Core (1)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
279var values = existingValues.ToArray();
Microsoft.AspNetCore.Mvc.Core.Test (3)
ModelBinding\Binders\CollectionModelBinderTest.cs (1)
514valueToConvert = value.Values.ToArray();
ModelBinding\EnumerableValueProviderTest.cs (2)
182Assert.Equal(new[] { "someValue1", "someValue2" }, result.Values.ToArray()); 218Assert.Equal(new[] { null, null, "value" }, result.Values.ToArray());
Microsoft.AspNetCore.OutputCaching.Tests (3)
OutputCachePoliciesTests.cs (3)
217Assert.Equal(headers, context.CacheVaryByRules.HeaderNames.ToArray()); 255Assert.Equal(queries, context.CacheVaryByRules.QueryKeys.ToArray()); 268Assert.Equal(queries, context.CacheVaryByRules.QueryKeys.ToArray());
Microsoft.AspNetCore.ResponseCaching (4)
ResponseCachingKeyProvider.cs (3)
115var headerValuesArray = headerValues.ToArray(); 145var queryValueArray = queryArray[i].Value.ToArray(); 169var queryValueArray = queryKeyValues.ToArray();
ResponseCachingMiddleware.cs (1)
491var originalArray = stringValues.ToArray();
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Http\HttpRequestHeaders.cs (1)
55_headers._Cookie = string.Join("; ", _headers._Cookie.ToArray());
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (3)
HttpRequestHeadersTests.cs (3)
382Assert.Equal(new[] { "localhost" }, entries[1].Value.ToArray()); 385Assert.Equal(new[] { "0" }, entries[2].Value.ToArray()); 388Assert.Equal(new[] { "value" }, entries[3].Value.ToArray());
Microsoft.AspNetCore.SignalR.Tests (1)
HttpHeaderConnectionHandler.cs (1)
26var headerValues = headers.FirstOrDefault(h => string.Equals(h.Key, headerName, StringComparison.OrdinalIgnoreCase)).Value.ToArray();
Microsoft.AspNetCore.SpaServices.Extensions (2)
Proxying\SpaProxy.cs (2)
152if (!requestMessage.Headers.TryAddWithoutValidation(header.Key, header.Value.ToArray()) && requestMessage.Content != null) 154requestMessage.Content?.Headers.TryAddWithoutValidation(header.Key, header.Value.ToArray());
Microsoft.AspNetCore.WebUtilities (1)
KeyValueAccumulator.cs (1)
54var array = values.ToArray();
Microsoft.AspNetCore.WebUtilities.Tests (3)
QueryHelpersTests.cs (3)
33Assert.Equal(new[] { "valueA", "valueC" }, collection["key1"].ToArray()); 51Assert.Equal(new[] { "value1", "" }, collection[""].ToArray()); 91Assert.Equal(new[] { "[ 1 ]", "[ 2 ]" }, collection["fields [todoItems]"].ToArray());