123 references to StringValues
HeaderPropagationSample (1)
HttpStress (2)
InMemory.FunctionalTests (3)
InProcessWebSite (1)
Microsoft.AspNetCore.Authentication.Cookies (1)
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Components.Endpoints.Tests (5)
Binding\FormDataMapperTests.cs (5)
322var data = new Dictionary<string, StringValues>() { ["values"] = new StringValues(new[] { "10", "11" }) };
340var data = new Dictionary<string, StringValues>() { ["values"] = new StringValues(new[] { "Red", "Blue" }) };
358var data = new Dictionary<string, StringValues>() { ["values"] = new StringValues(new[] { "Red", "Blue" }) };
376var data = new Dictionary<string, StringValues>() { ["values"] = new StringValues(new[] { "10", "a" }) };
401var data = new Dictionary<string, StringValues>() { ["values"] = new StringValues(new[] { "10", "a", "11" }) };
Microsoft.AspNetCore.CookiePolicy.Test (1)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (2)
Microsoft.AspNetCore.HeaderParsing.Tests (13)
Microsoft.AspNetCore.Http (2)
Microsoft.AspNetCore.Http.Abstractions.Microbenchmarks (2)
Microsoft.AspNetCore.Http.Extensions (2)
Microsoft.AspNetCore.Http.Extensions.Tests (20)
RequestDelegateFactoryTests.cs (7)
311new object[] { (Action<HttpContext, StringValues>)Store, new[] { "1", "2", "3" }, new StringValues(new[] { "1", "2", "3" }) },
630["a"] = new(new[] { "1", "2", "3" })
633httpContext.Request.Headers["Custom"] = new(new[] { "4", "5", "6" });
637["form"] = new(new[] { "7", "8", "9" })
654Assert.Equal(new StringValues(new[] { "1", "2", "3" }), httpContext.Items["query"]);
655Assert.Equal(new StringValues(new[] { "4", "5", "6" }), httpContext.Items["headers"]);
656Assert.Equal(new StringValues(new[] { "7", "8", "9" }), httpContext.Items["form"]!);
RequestDelegateGenerator\RequestDelegateCreationTests.Arrays.cs (8)
57httpContext.Request.Headers.Add("p", new StringValues(new string[] { "1", "1" }));
78httpContext.Request.Headers.Add("p", new StringValues(new string[] { "1", "1" }));
99httpContext.Request.Headers.Add("p", new StringValues(new string[] { "1", "1" }));
117new object[] { "StringValues", new[] { "1", "2", "3" }, new StringValues(new[] { "1", "2", "3" }) },
118new object[] { "StringValues", new[] { "1", "", "3" }, new StringValues(new[] { "1", "", "3" }) },
762["a"] = new(new[] { "1", "2", "3" })
765httpContext.Request.Headers["Custom"] = new(new[] { "4", "5", "6" });
769["form"] = new(new[] { "7", "8", "9" })
Microsoft.AspNetCore.Http.Tests (3)
RequestCookiesCollectionTests.cs (3)
28var cookies = RequestCookieCollection.Parse(new StringValues(new[] { "a=a", "b=b", "c=c", "d=d", "e=e", "f=f", "g=g", "h=h", "i=i", "j=j", "k=k", "l=l" }));
43var cookies = RequestCookieCollection.Parse(new StringValues(new[] { cookieToParse }));
64var cookies = RequestCookieCollection.Parse(new StringValues(new[] { $"something={c}" }));
Microsoft.AspNetCore.Mvc.Core (1)
Microsoft.AspNetCore.OutputCaching (1)
Microsoft.AspNetCore.OutputCaching.Tests (5)
Microsoft.AspNetCore.RequestDecompression.Tests (1)
Microsoft.AspNetCore.ResponseCaching (3)
Microsoft.AspNetCore.ResponseCaching.Tests (18)
ResponseCachingMiddlewareTests.cs (18)
525context.HttpContext.Response.Headers.Vary = new StringValues(new[] { "headerA", "HEADERB", "HEADERc" });
528VaryByQueryKeys = new StringValues(new[] { "queryB", "QUERYA" })
532Headers = new StringValues(new[] { "HeaderA", "HeaderB" }),
533QueryKeys = new StringValues(new[] { "QueryA", "QueryB" })
554context.HttpContext.Response.Headers.Vary = new StringValues(new[] { "headerA", "HEADERB" });
557VaryByQueryKeys = new StringValues(new[] { "queryB", "QUERYA" })
562Headers = new StringValues(new[] { "HEADERA", "HEADERB" }),
563QueryKeys = new StringValues(new[] { "QUERYA", "QUERYB" })
587new StringValues((string[])null),
588new StringValues(new string[0]),
589new StringValues(new string[] { null }),
590new StringValues(new string[] { string.Empty })
680Assert.Equal(new StringValues(new[] { "HEADERA", "HEADERB" }), context.CachedVaryByRules.Headers);
928var uppercaseStrings = new StringValues(new[] { "STRINGA", "STRINGB" });
929var lowercaseStrings = new StringValues(new[] { "stringA", "stringB" });
939var orderedStrings = new StringValues(new[] { "STRINGA", "STRINGB" });
940var reverseOrderStrings = new StringValues(new[] { "STRINGB", "STRINGA" });
950var originalStrings = new StringValues(new[] { "STRINGA, STRINGB" });
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (3)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (8)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (9)
Http2\Http2HeadersEnumeratorBenchmark.cs (8)
33_knownMultipleValueResponseHeaders.Server = new StringValues(new[] { "One", "Two" });
34_knownMultipleValueResponseHeaders.Date = new StringValues(new[] { "One", "Two" });
35_knownMultipleValueResponseHeaders.ContentType = new StringValues(new[] { "One", "Two" });
36_knownMultipleValueResponseHeaders.SetCookie = new StringValues(new[] { "One", "Two" });
45_unknownMultipleValueResponseHeaders.Append("One", new StringValues(new[] { "One", "Two" }));
46_unknownMultipleValueResponseHeaders.Append("Two", new StringValues(new[] { "One", "Two" }));
47_unknownMultipleValueResponseHeaders.Append("Three", new StringValues(new[] { "One", "Two" }));
48_unknownMultipleValueResponseHeaders.Append("Four", new StringValues(new[] { "One", "Two" }));
Microsoft.AspNetCore.WebUtilities (1)
Microsoft.AspNetCore.WebUtilities.Tests (1)
Microsoft.Extensions.Primitives (12)
StringValues.cs (12)
27public static readonly StringValues Empty = new StringValues(Array.Empty<string>());
64return new StringValues(values);
469return new StringValues(combined);
494return new StringValues(combined);
519return new StringValues(combined);
606public static bool Equals(string?[]? left, StringValues right) => Equals(new StringValues(left), right);
614public static bool Equals(StringValues left, string?[]? right) => Equals(left, new StringValues(right));
621public bool Equals(string?[]? other) => Equals(this, new StringValues(other));
646public static bool operator ==(StringValues left, string?[]? right) => Equals(left, new StringValues(right));
654public static bool operator !=(StringValues left, string?[]? right) => !Equals(left, new StringValues(right));
657public static bool operator ==(string?[]? left, StringValues right) => Equals(new StringValues(left), right);
665public static bool operator !=(string?[]? left, StringValues right) => !Equals(new StringValues(left), right);
Sockets.FunctionalTests (1)