4 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 (3)
StaticAssetsIntegrationTests.cs (3)
496
manifest.Endpoints.Add(new
StaticAssetDescriptor
517
manifest.Endpoints.Add(new
StaticAssetDescriptor
574
manifest.Endpoints.Add(new
StaticAssetDescriptor
94 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 (88)
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;
75
private static string? GetDescriptorOriginalResourceProperty(
StaticAssetDescriptor
descriptor)
89
private static string? GetDescriptorETagResponseHeader(
StaticAssetDescriptor
descriptor)
103
private void CreateDescriptorMap(List<
StaticAssetDescriptor
> descriptors)
107
var
descriptor = descriptors[i];
136
private readonly
StaticAssetDescriptor
_asset;
138
public RuntimeStaticAssetResponseBodyFeature(IHttpResponseBodyFeature original, HttpContext context,
StaticAssetDescriptor
asset)
163
var
assetDescriptor = endpoint.Metadata.OfType<
StaticAssetDescriptor
>().Single();
219
List<
StaticAssetDescriptor
> descriptors)
226
foreach (
var
descriptor in descriptors)
299
private static void DisableCachingHeaders(
StaticAssetDescriptor
descriptor)
328
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 (36)
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).Route,
59
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)obj).Route = value!,
66
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
).GetProperty("Route", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
79
DeclaringType = typeof(global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
),
81
Getter = static obj => ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)obj).AssetPath,
82
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)obj).AssetPath = value!,
89
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
).GetProperty("AssetPath", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
102
DeclaringType = typeof(global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
),
104
Getter = static obj => ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)obj).Selectors,
105
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)obj).Selectors = value!,
112
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),
124
DeclaringType = typeof(global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
),
126
Getter = static obj => ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)obj).Properties,
127
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)obj).Properties = value!,
134
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),
146
DeclaringType = typeof(global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
),
148
Getter = static obj => ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)obj).ResponseHeaders,
149
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)obj).ResponseHeaders = value!,
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),
168
private void StaticAssetDescriptorSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
? value)
178
writer.WriteString(PropName_Route, ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)value).Route);
179
writer.WriteString(PropName_AssetFile, ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)value).AssetPath);
181
IReadOnlyListStaticAssetSelectorSerializeHandler(writer, ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)value).Selectors);
183
IReadOnlyListStaticAssetPropertySerializeHandler(writer, ((global::Microsoft.AspNetCore.StaticAssets.
StaticAssetDescriptor
)value).Properties);
185
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)
211
var
descriptor = descriptors[0];
268
var
descriptor = descriptors[0];