92 instantiations of HeaderDictionary
InProcessWebSite (2)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (2)
300var headers = new HeaderDictionary(); 340var headers = new HeaderDictionary();
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
RazorComponentResultTest.cs (1)
243responseMock.Setup(r => r.Headers).Returns(new HeaderDictionary());
Microsoft.AspNetCore.Hosting.Tests (8)
HostingApplicationDiagnosticsTests.cs (8)
506Headers = new HeaderDictionary() 537Headers = new HeaderDictionary() 567Headers = new HeaderDictionary() 598Headers = new HeaderDictionary() 635Headers = new HeaderDictionary() 664Headers = new HeaderDictionary() 706Headers = new HeaderDictionary() 774Headers = new HeaderDictionary()
Microsoft.AspNetCore.Http (3)
Features\FormFeature.cs (1)
275file.Headers = new HeaderDictionary(section.Headers);
Features\HttpRequestFeature.cs (1)
16Headers = new HeaderDictionary();
Features\HttpResponseFeature.cs (1)
17Headers = new HeaderDictionary();
Microsoft.AspNetCore.Http.Abstractions.Microbenchmarks (1)
GetHeaderSplitBenchmark.cs (1)
23_dictionary = new HeaderDictionary(dict);
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionDispatcher.cs (1)
731requestFeature.Headers = new HeaderDictionary(requestHeaders);
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateFactoryTests.cs (1)
3710public IHeaderDictionary Headers { get; set; } = new HeaderDictionary();
Microsoft.AspNetCore.Http.Tests (25)
DefaultHttpContextTests.cs (1)
432public IHeaderDictionary Headers { get; set; } = new HeaderDictionary();
HeaderDictionaryTests.cs (8)
23var headers = new HeaderDictionary( 43var headers = new HeaderDictionary( 58var headers = new HeaderDictionary( 71var headers = new HeaderDictionary( 90var headers = new HeaderDictionary(); 106var headers = new HeaderDictionary 122var emptyHeaders = withStore ? new HeaderDictionary(1) : new HeaderDictionary();
Internal\DefaultHttpRequestTests.cs (4)
67var headers = new HeaderDictionary() 87var headers = new HeaderDictionary() 107var headers = new HeaderDictionary(); 375var headers = new HeaderDictionary();
Internal\DefaultHttpResponseTests.cs (1)
257var headers = new HeaderDictionary();
ResponseCookiesTest.cs (11)
27var headers = (IHeaderDictionary)new HeaderDictionary(); 60var headers = (IHeaderDictionary)new HeaderDictionary(); 81var headers = (IHeaderDictionary)new HeaderDictionary(); 103var headers = (IHeaderDictionary)new HeaderDictionary(); 120var headers = (IHeaderDictionary)new HeaderDictionary(); 150var headers = (IHeaderDictionary)new HeaderDictionary(); 178var headers = (IHeaderDictionary)new HeaderDictionary(); 210var headers = (IHeaderDictionary)new HeaderDictionary(); 228var headers = (IHeaderDictionary)new HeaderDictionary(); 250var headers = (IHeaderDictionary)new HeaderDictionary(); 266var headers = new HeaderDictionary();
Microsoft.AspNetCore.Mvc.Core.Test (1)
Infrastructure\ActionSelectorTest.cs (1)
1109request.SetupGet(r => r.Headers).Returns(new HeaderDictionary());
Microsoft.AspNetCore.Mvc.IntegrationTests (2)
ComplexRecordIntegrationTest.cs (1)
4232Headers = new HeaderDictionary(),
ComplexTypeIntegrationTestBase.cs (1)
3731Headers = new HeaderDictionary(),
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (1)
EndToEndBenchmarks.cs (1)
55_headers = new HeaderDictionary
Microsoft.AspNetCore.OutputCaching.Tests (10)
OutputCacheEntryFormatterTests.cs (2)
51.CopyHeadersFrom(new HeaderDictionary { [HeaderNames.Accept] = new[] { "text/plain", "text/html" }, [HeaderNames.AcceptCharset] = "utf8" }) 70entry.CopyHeadersFrom(new HeaderDictionary { [""] = "", [HeaderNames.Accept] = new[] { null, null, "", "text/html" }, [HeaderNames.AcceptCharset] = new string[] { null } });
OutputCacheMiddlewareTests.cs (8)
108.CopyHeadersFrom(new HeaderDictionary() { { "MyHeader", "NewValue" } })) 183entry.CopyHeadersFrom(new HeaderDictionary { [HeaderNames.Date] = HeaderUtilities.FormatDate(value) }); 221entry.CopyHeadersFrom(new HeaderDictionary 261entry.CopyHeadersFrom(new HeaderDictionary { [HeaderNames.LastModified] = HeaderUtilities.FormatDate(utcNow + TimeSpan.FromSeconds(10)) }); 282context.CachedResponse.CopyHeadersFrom(new HeaderDictionary { [HeaderNames.LastModified] = HeaderUtilities.FormatDate(utcNow - TimeSpan.FromSeconds(10)) }); 325.CopyHeadersFrom(new HeaderDictionary { [HeaderNames.ETag] = responseETag.ToString() }); 343context.CachedResponse.CopyHeadersFrom(new HeaderDictionary { [HeaderNames.ETag] = "\"E2\"" }); 358context.CachedResponse.CopyHeadersFrom(new HeaderDictionary { [HeaderNames.ETag] = "\"E2\"" });
Microsoft.AspNetCore.ResponseCaching (2)
MemoryCachedResponse.cs (1)
14public IHeaderDictionary Headers { get; set; } = new HeaderDictionary();
ResponseCachingMiddleware.cs (1)
309Headers = new HeaderDictionary()
Microsoft.AspNetCore.ResponseCaching.Tests (28)
ResponseCachingMiddlewareTests.cs (14)
63Headers = new HeaderDictionary(), 88Headers = new HeaderDictionary() 140Headers = new HeaderDictionary(), 181context.CachedResponseHeaders = new HeaderDictionary(); 193context.CachedResponseHeaders = new HeaderDictionary(); 224context.CachedResponseHeaders = new HeaderDictionary(); 258context.CachedResponseHeaders = new HeaderDictionary(); 277context.CachedResponseHeaders = new HeaderDictionary(); 293context.CachedResponseHeaders = new HeaderDictionary(); 320context.CachedResponseHeaders = new HeaderDictionary(); 335context.CachedResponseHeaders = new HeaderDictionary(); 348context.CachedResponseHeaders = new HeaderDictionary(); 789Headers = new HeaderDictionary() 862context.CachedResponse = new CachedResponse() { Headers = new HeaderDictionary() };
ResponseCachingPolicyProviderTests.cs (14)
493context.CachedResponseHeaders = new HeaderDictionary(); 507context.CachedResponseHeaders = new HeaderDictionary(); 525context.CachedResponseHeaders = new HeaderDictionary(); 546context.CachedResponseHeaders = new HeaderDictionary(); 566context.CachedResponseHeaders = new HeaderDictionary(); 588context.CachedResponseHeaders = new HeaderDictionary(); 609context.CachedResponseHeaders = new HeaderDictionary(); 633context.CachedResponseHeaders = new HeaderDictionary(); 657context.CachedResponseHeaders = new HeaderDictionary(); 681context.CachedResponseHeaders = new HeaderDictionary(); 704context.CachedResponseHeaders = new HeaderDictionary(); 728context.CachedResponseHeaders = new HeaderDictionary(); 752context.CachedResponseHeaders = new HeaderDictionary(); 777context.CachedResponseHeaders = new HeaderDictionary();
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (3)
RequestHeaderTests.cs (3)
116var headerDictionary = new HeaderDictionary(new Dictionary<string, StringValues> { 139var headerDictionary = new HeaderDictionary(new Dictionary<string, StringValues> { 170var headerDictionary = new HeaderDictionary(new Dictionary<string, StringValues> {
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Http\HttpProtocol.cs (1)
228public IHeaderDictionary RequestTrailers { get; } = new HeaderDictionary();
Microsoft.AspNetCore.TestHost (2)
ResponseFeature.cs (1)
12private readonly HeaderDictionary _headers = new HeaderDictionary();
ResponseTrailersFeature.cs (1)
11public IHeaderDictionary Trailers { get; set; } = new HeaderDictionary();
37 references to HeaderDictionary
InProcessWebSite (2)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (2)
300var headers = new HeaderDictionary(); 340var headers = new HeaderDictionary();
Microsoft.AspNetCore.App.Analyzers.Test (1)
Verifiers\CSharpAnalyzerVerifier.cs (1)
87TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Http.HeaderDictionary).Assembly.Location),
Microsoft.AspNetCore.Http (16)
HeaderDictionary.cs (14)
27/// Initializes a new instance of <see cref="HeaderDictionary"/>. 34/// Initializes a new instance of <see cref="HeaderDictionary"/>. 43/// Initializes a new instance of <see cref="HeaderDictionary"/>. 149/// Gets the number of elements contained in the <see cref="HeaderDictionary" />;. 151/// <returns>The number of elements contained in the <see cref="HeaderDictionary" />.</returns> 155/// Gets a value that indicates whether the <see cref="HeaderDictionary" /> is in read-only mode. 157/// <returns>true if the <see cref="HeaderDictionary" /> is in read-only mode; otherwise, false.</returns> 244/// Determines whether the <see cref="HeaderDictionary" /> contains a specific key. 247/// <returns>true if the <see cref="HeaderDictionary" /> contains a specific key; otherwise, false.</returns> 258/// Copies the <see cref="HeaderDictionary" /> elements to a one-dimensional Array instance at the specified index. 260/// <param name="array">The one-dimensional Array that is the destination of the specified objects copied from the <see cref="HeaderDictionary" />.</param> 316/// <returns>true if the <see cref="HeaderDictionary" /> contains the key; otherwise, false.</returns> 394/// Enumerates a <see cref="HeaderDictionary"/>. 409/// Advances the enumerator to the next element of the <see cref="HeaderDictionary"/>.
QueryCollection.cs (1)
204/// Advances the enumerator to the next element of the <see cref="HeaderDictionary"/>.
QueryCollectionInternal.cs (1)
98/// Advances the enumerator to the next element of the <see cref="HeaderDictionary"/>.
Microsoft.AspNetCore.Http.Abstractions.Microbenchmarks (1)
GetHeaderSplitBenchmark.cs (1)
11HeaderDictionary _dictionary;
Microsoft.AspNetCore.Http.Tests (13)
HeaderDictionaryTests.cs (7)
23var headers = new HeaderDictionary( 43var headers = new HeaderDictionary( 58var headers = new HeaderDictionary( 71var headers = new HeaderDictionary( 90var headers = new HeaderDictionary(); 106var headers = new HeaderDictionary 122var emptyHeaders = withStore ? new HeaderDictionary(1) : new HeaderDictionary();
Internal\DefaultHttpRequestTests.cs (4)
67var headers = new HeaderDictionary() 87var headers = new HeaderDictionary() 107var headers = new HeaderDictionary(); 375var headers = new HeaderDictionary();
Internal\DefaultHttpResponseTests.cs (1)
257var headers = new HeaderDictionary();
ResponseCookiesTest.cs (1)
266var headers = new HeaderDictionary();
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (3)
RequestHeaderTests.cs (3)
116var headerDictionary = new HeaderDictionary(new Dictionary<string, StringValues> { 139var headerDictionary = new HeaderDictionary(new Dictionary<string, StringValues> { 170var headerDictionary = new HeaderDictionary(new Dictionary<string, StringValues> {
Microsoft.AspNetCore.TestHost (1)
ResponseFeature.cs (1)
12private readonly HeaderDictionary _headers = new HeaderDictionary();