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