24 instantiations of StaticAssetResponseHeader
Microsoft.AspNetCore.StaticAssets (3)
Development\StaticAssetDevelopmentRuntimeHandler.cs (1)
316responseHeaders.Insert(i, new StaticAssetResponseHeader(HeaderNames.CacheControl, "no-cache"));
StaticAssetsInvoker.cs (1)
51_remainingHeaders.Add(new StaticAssetResponseHeader("ETag", _etag.ToString()));
StaticAssetsManifestJsonContext.StaticAssetResponseHeader.g.cs (1)
32ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader((string)args[0], (string)args[1]),
Microsoft.AspNetCore.StaticAssets.Tests (21)
StaticAssetsIntegrationTests.cs (21)
83new TestResource("sample.txt", "Hello, World!", false, [new("Cache-Control", "immutable")]), 134new TestResource("sample.txt", "Hello, World!", false, [new("Cache-Control", "immutable")]), 186new TestResource("sample.txt", "Hello, World!", false, [new("Cache-Control", "immutable")]), 243new TestResource("sample.txt", "Hello, World!", false, [new("Cache-Control", "immutable")]), 503new ("Accept-Ranges", "bytes"), 504new("Content-Length", resource.Content.Length.ToString(CultureInfo.InvariantCulture)), 505new("Content-Type", GetContentType(filePath)), 506new ("ETag", $"\"{hash}\""), 507new("Last-Modified", lastModified.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture)), 524new ("Accept-Ranges", "bytes"), 525new ("Content-Type", GetContentType(filePath)), 527new ("Content-Length", length.ToString(CultureInfo.InvariantCulture)), 528new ("ETag", $"\"{GetEtagForFile(compressedFilePath)}\""), 529new ("Last-Modified", lastModified.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture)), 531new ("Content-Encoding", "gzip"), 532new ("Vary", "Accept-Encoding"), 581new ("Accept-Ranges", "bytes"), 582new("Content-Length", "Hello, World!".Length.ToString(CultureInfo.InvariantCulture)), 583new("Content-Type", GetContentType("sample.txt")), 584new ("ETag", $"\"{GetEtag("Hello, World!")}\""), 585new("Last-Modified", new DateTimeOffset(2023,03,03,0,0,0,TimeSpan.Zero).ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture))
49 references to StaticAssetResponseHeader
Microsoft.AspNetCore.StaticAssets (48)
Development\StaticAssetDescriptorExtensions.cs (4)
14foreach (var header in descriptor.ResponseHeaders) 27foreach (var header in descriptor.ResponseHeaders) 40foreach (var header in descriptor.ResponseHeaders) 70foreach (var header in descriptor.ResponseHeaders)
Development\StaticAssetDevelopmentRuntimeHandler.cs (3)
93var header = descriptor.ResponseHeaders[i]; 306var responseHeaders = new List<StaticAssetResponseHeader>(descriptor.ResponseHeaders); 310var responseHeader = descriptor.ResponseHeaders[i];
StaticAssetDescriptor.cs (2)
20private IReadOnlyList<StaticAssetResponseHeader> _responseHeaders = []; 65public IReadOnlyList<StaticAssetResponseHeader> ResponseHeaders
StaticAssetsInvoker.cs (3)
28private readonly List<StaticAssetResponseHeader> _remainingHeaders; 39foreach (var responseHeader in resource.ResponseHeaders) 105foreach (var header in _remainingHeaders ?? [])
StaticAssetsManifestJsonContext.GetJsonTypeInfo.g.cs (2)
30if (type == typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader)) 46if (type == typeof(global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader>))
StaticAssetsManifestJsonContext.IReadOnlyListStaticAssetResponseHeader.g.cs (12)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader>>? _IReadOnlyListStaticAssetResponseHeader; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader>> IReadOnlyListStaticAssetResponseHeader 22get => _IReadOnlyListStaticAssetResponseHeader ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader>)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader>> Create_IReadOnlyListStaticAssetResponseHeader(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader>> jsonTypeInfo)) 29var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader>> 35jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateIEnumerableInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader>, global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader>(options, info); 45private void IReadOnlyListStaticAssetResponseHeaderSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader>? value) 55foreach (global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader element in value)
StaticAssetsManifestJsonContext.StaticAssetDescriptor.g.cs (3)
141var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader>> 156AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor).GetProperty("ResponseHeaders", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader>), global::System.Array.Empty<global::System.Type>(), null), 159properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader>>(options, info4);
StaticAssetsManifestJsonContext.StaticAssetResponseHeader.g.cs (19)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader>? _StaticAssetResponseHeader; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader> StaticAssetResponseHeader 22get => _StaticAssetResponseHeader ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader>)Options.GetTypeInfo(typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader> Create_StaticAssetResponseHeader(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader> jsonTypeInfo)) 29var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader> 35ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string)}, modifiers: null), 39jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader>(options, objectInfo); 56DeclaringType = typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader), 58Getter = static obj => ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader)obj).Name, 66AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader).GetProperty("Name", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 77DeclaringType = typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader), 79Getter = static obj => ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader)obj).Value, 87AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader).GetProperty("Value", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 98private void StaticAssetResponseHeaderSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader? value) 108writer.WriteString(PropName_Name, ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader)value).Name); 109writer.WriteString(PropName_Value, ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetResponseHeader)value).Value);
Microsoft.AspNetCore.StaticAssets.Tests (1)
StaticAssetsIntegrationTests.cs (1)
1049private record TestResource(string Path, string Content, bool IncludeCompressedVersion, StaticAssetResponseHeader[] AdditionalHeaders = null);