6 instantiations of StaticAssetDescriptor
Microsoft.AspNetCore.StaticAssets (1)
StaticAssetsManifestJsonContext.StaticAssetDescriptor.g.cs (1)
32
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
(){ Route = (string)args[0], AssetPath = (string)args[1] },
Microsoft.AspNetCore.StaticAssets.Tests (5)
StaticAssetsIntegrationTests.cs (5)
620
manifest.Endpoints.Add(new
StaticAssetDescriptor
641
manifest.Endpoints.Add(new
StaticAssetDescriptor
698
manifest.Endpoints.Add(new
StaticAssetDescriptor
1292
new
StaticAssetDescriptor
1307
new
StaticAssetDescriptor
99 references to StaticAssetDescriptor
Microsoft.AspNetCore.Components.Endpoints (2)
src\Shared\Components\ResourceCollectionResolver.cs (2)
40
foreach (
var
descriptor in descriptors)
137
StaticAssetDescriptor
descriptor,
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
src\Shared\Components\ResourceCollectionResolver.cs (2)
40
foreach (
var
descriptor in descriptors)
137
StaticAssetDescriptor
descriptor,
Microsoft.AspNetCore.StaticAssets (93)
Development\StaticAssetDescriptorExtensions.cs (5)
12
internal static long GetContentLength(this
StaticAssetDescriptor
descriptor)
25
internal static DateTimeOffset GetLastModified(this
StaticAssetDescriptor
descriptor)
38
internal static EntityTagHeaderValue GetWeakETag(this
StaticAssetDescriptor
descriptor)
55
internal static bool HasContentEncoding(this
StaticAssetDescriptor
descriptor)
68
internal static bool HasETag(this
StaticAssetDescriptor
descriptor, string tag)
Development\StaticAssetDevelopmentRuntimeHandler.cs (17)
30
private readonly Dictionary<(string Route, string ETag),
StaticAssetDescriptor
> _descriptorsMap = [];
32
public StaticAssetDevelopmentRuntimeHandler(List<
StaticAssetDescriptor
> descriptors)
40
var
asset = builder.Metadata.OfType<
StaticAssetDescriptor
>().Single();
44
StaticAssetDescriptor
? originalAsset = null;
78
private static string? GetDescriptorOriginalResourceProperty(
StaticAssetDescriptor
descriptor)
92
private static string? GetDescriptorETagResponseHeader(
StaticAssetDescriptor
descriptor)
106
private void CreateDescriptorMap(List<
StaticAssetDescriptor
> descriptors)
110
var
descriptor = descriptors[i];
151
private readonly
StaticAssetDescriptor
_asset;
153
public RuntimeStaticAssetResponseBodyFeature(IHttpResponseBodyFeature original, HttpContext context,
StaticAssetDescriptor
asset)
178
var
assetDescriptor = endpoint.Metadata.OfType<
StaticAssetDescriptor
>().Single();
259
List<
StaticAssetDescriptor
> descriptors)
266
foreach (
var
descriptor in descriptors)
339
private static void DisableCachingHeaders(
StaticAssetDescriptor
descriptor)
368
private static void RemoveIntegrityProperty(
StaticAssetDescriptor
descriptor)
Infrastructure\StaticAssetsEndpointDataSourceHelper.cs (1)
38
public static IReadOnlyList<
StaticAssetDescriptor
> ResolveStaticAssetDescriptors(
StaticAssetEndpointDataSource.cs (4)
19
private readonly List<
StaticAssetDescriptor
> _descriptors;
32
List<
StaticAssetDescriptor
> descriptors)
59
internal IReadOnlyList<
StaticAssetDescriptor
> Descriptors => _descriptors;
105
foreach (
var
asset in _descriptors)
StaticAssetEndpointFactory.cs (1)
19
public Endpoint Create(
StaticAssetDescriptor
resource, List<Action<EndpointBuilder>> conventions, List<Action<EndpointBuilder>> finallyConventions)
StaticAssetsEndpointConventionBuilder.cs (3)
15
private readonly List<
StaticAssetDescriptor
> _descriptors;
19
internal StaticAssetsEndpointConventionBuilder(object lck, bool isBuildManifest, List<
StaticAssetDescriptor
> descriptors, List<Action<EndpointBuilder>> conventions, List<Action<EndpointBuilder>> finallyConventions)
28
internal List<
StaticAssetDescriptor
> Descriptors => _descriptors;
StaticAssetsInvoker.cs (2)
20
private readonly
StaticAssetDescriptor
_resource;
32
public StaticAssetsInvoker(
StaticAssetDescriptor
resource, IFileProvider fileProvider, ILogger<StaticAssetsInvoker> logger)
StaticAssetsManifest.cs (2)
38
internal static StaticAssetsEndpointDataSource CreateDataSource(IEndpointRouteBuilder endpoints, string manifestName, List<
StaticAssetDescriptor
> descriptors, bool isBuildManifest)
54
public List<
StaticAssetDescriptor
> Endpoints { get; set; } = [];
StaticAssetsManifestJsonContext.GetJsonTypeInfo.g.cs (2)
22
if (type == typeof(global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
))
54
if (type == typeof(global::System.Collections.Generic.List<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
>))
StaticAssetsManifestJsonContext.ListStaticAssetDescriptor.g.cs (12)
13
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.List<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
>>? _ListStaticAssetDescriptor;
19
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.List<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
>> ListStaticAssetDescriptor
22
get => _ListStaticAssetDescriptor ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.List<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.List<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
>));
25
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.List<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
>> Create_ListStaticAssetDescriptor(global::System.Text.Json.JsonSerializerOptions options)
27
if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.List<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.List<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
>> jsonTypeInfo))
29
var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.List<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
>>
31
ObjectCreator = () => new global::System.Collections.Generic.List<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
>(),
35
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateListInfo<global::System.Collections.Generic.List<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
>, global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
>(options, info);
45
private void ListStaticAssetDescriptorSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.List<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
>? value)
StaticAssetsManifestJsonContext.StaticAssetDescriptor.g.cs (41)
13
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
>? _StaticAssetDescriptor;
19
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
> StaticAssetDescriptor
22
get => _StaticAssetDescriptor ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
>)Options.GetTypeInfo(typeof(global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
));
25
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
> Create_StaticAssetDescriptor(global::System.Text.Json.JsonSerializerOptions options)
27
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
> jsonTypeInfo))
29
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
>
35
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
39
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
>(options, objectInfo);
56
DeclaringType = typeof(global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
),
58
Getter = static obj => ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)obj).Order,
59
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)obj).Order = value!,
66
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
).GetProperty("Order", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
76
DeclaringType = typeof(global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
),
78
Getter = static obj => ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)obj).Route,
79
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)obj).Route = value!,
86
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
).GetProperty("Route", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
99
DeclaringType = typeof(global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
),
101
Getter = static obj => ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)obj).AssetPath,
102
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)obj).AssetPath = value!,
109
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
).GetProperty("AssetPath", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
122
DeclaringType = typeof(global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
),
124
Getter = static obj => ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)obj).Selectors,
125
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)obj).Selectors = value!,
132
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
).GetProperty("Selectors", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetSelector>), global::System.Array.Empty<global::System.Type>(), null),
144
DeclaringType = typeof(global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
),
146
Getter = static obj => ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)obj).Properties,
147
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)obj).Properties = value!,
154
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
).GetProperty("Properties", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.StaticAssets.StaticAssetProperty>), global::System.Array.Empty<global::System.Type>(), null),
166
DeclaringType = typeof(global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
),
168
Getter = static obj => ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)obj).ResponseHeaders,
169
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)obj).ResponseHeaders = value!,
176
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),
188
private void StaticAssetDescriptorSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
? value)
198
string __value_Order = ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)value).Order;
203
writer.WriteString(PropName_Route, ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)value).Route);
204
writer.WriteString(PropName_AssetFile, ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)value).AssetPath);
206
IReadOnlyListStaticAssetSelectorSerializeHandler(writer, ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)value).Selectors);
208
IReadOnlyListStaticAssetPropertySerializeHandler(writer, ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)value).Properties);
210
IReadOnlyListStaticAssetResponseHeaderSerializeHandler(writer, ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)value).ResponseHeaders);
StaticAssetsManifestJsonContext.StaticAssetsManifest.g.cs (3)
93
var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.List<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
>>
108
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetsManifest).GetProperty("Endpoints", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.List<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
>), global::System.Array.Empty<global::System.Type>(), null),
111
properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.List<global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
>>(options, info2);
Microsoft.AspNetCore.StaticAssets.Tests (2)
StaticAssetsIntegrationTests.cs (2)
212
var
descriptor = descriptors[0];
269
var
descriptor = descriptors[0];