4 instantiations of StaticAssetDescriptor
Microsoft.AspNetCore.StaticAssets (1)
StaticAssetsManifestJsonContext.StaticAssetDescriptor.g.cs (1)
32ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor(){ Route = (string)args[0], AssetPath = (string)args[1] },
Microsoft.AspNetCore.StaticAssets.Tests (3)
StaticAssetsIntegrationTests.cs (3)
496manifest.Endpoints.Add(new StaticAssetDescriptor 517manifest.Endpoints.Add(new StaticAssetDescriptor 574manifest.Endpoints.Add(new StaticAssetDescriptor
94 references to StaticAssetDescriptor
Microsoft.AspNetCore.Components.Endpoints (2)
src\Shared\Components\ResourceCollectionResolver.cs (2)
40foreach (var descriptor in descriptors) 137StaticAssetDescriptor descriptor,
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
src\Shared\Components\ResourceCollectionResolver.cs (2)
40foreach (var descriptor in descriptors) 137StaticAssetDescriptor descriptor,
Microsoft.AspNetCore.StaticAssets (88)
Development\StaticAssetDescriptorExtensions.cs (5)
12internal static long GetContentLength(this StaticAssetDescriptor descriptor) 25internal static DateTimeOffset GetLastModified(this StaticAssetDescriptor descriptor) 38internal static EntityTagHeaderValue GetWeakETag(this StaticAssetDescriptor descriptor) 55internal static bool HasContentEncoding(this StaticAssetDescriptor descriptor) 68internal static bool HasETag(this StaticAssetDescriptor descriptor, string tag)
Development\StaticAssetDevelopmentRuntimeHandler.cs (17)
30private readonly Dictionary<(string Route, string ETag), StaticAssetDescriptor> _descriptorsMap = []; 32public StaticAssetDevelopmentRuntimeHandler(List<StaticAssetDescriptor> descriptors) 40var asset = builder.Metadata.OfType<StaticAssetDescriptor>().Single(); 44StaticAssetDescriptor? originalAsset = null; 75private static string? GetDescriptorOriginalResourceProperty(StaticAssetDescriptor descriptor) 89private static string? GetDescriptorETagResponseHeader(StaticAssetDescriptor descriptor) 103private void CreateDescriptorMap(List<StaticAssetDescriptor> descriptors) 107var descriptor = descriptors[i]; 136private readonly StaticAssetDescriptor _asset; 138public RuntimeStaticAssetResponseBodyFeature(IHttpResponseBodyFeature original, HttpContext context, StaticAssetDescriptor asset) 163var assetDescriptor = endpoint.Metadata.OfType<StaticAssetDescriptor>().Single(); 219List<StaticAssetDescriptor> descriptors) 226foreach (var descriptor in descriptors) 299private static void DisableCachingHeaders(StaticAssetDescriptor descriptor) 328private static void RemoveIntegrityProperty(StaticAssetDescriptor descriptor)
Infrastructure\StaticAssetsEndpointDataSourceHelper.cs (1)
38public static IReadOnlyList<StaticAssetDescriptor> ResolveStaticAssetDescriptors(
StaticAssetEndpointDataSource.cs (4)
19private readonly List<StaticAssetDescriptor> _descriptors; 32List<StaticAssetDescriptor> descriptors) 59internal IReadOnlyList<StaticAssetDescriptor> Descriptors => _descriptors; 105foreach (var asset in _descriptors)
StaticAssetEndpointFactory.cs (1)
19public Endpoint Create(StaticAssetDescriptor resource, List<Action<EndpointBuilder>> conventions, List<Action<EndpointBuilder>> finallyConventions)
StaticAssetsEndpointConventionBuilder.cs (3)
15private readonly List<StaticAssetDescriptor> _descriptors; 19internal StaticAssetsEndpointConventionBuilder(object lck, bool isBuildManifest, List<StaticAssetDescriptor> descriptors, List<Action<EndpointBuilder>> conventions, List<Action<EndpointBuilder>> finallyConventions) 28internal List<StaticAssetDescriptor> Descriptors => _descriptors;
StaticAssetsInvoker.cs (2)
20private readonly StaticAssetDescriptor _resource; 32public StaticAssetsInvoker(StaticAssetDescriptor resource, IFileProvider fileProvider, ILogger<StaticAssetsInvoker> logger)
StaticAssetsManifest.cs (2)
38internal static StaticAssetsEndpointDataSource CreateDataSource(IEndpointRouteBuilder endpoints, string manifestName, List<StaticAssetDescriptor> descriptors, bool isBuildManifest) 54public List<StaticAssetDescriptor> Endpoints { get; set; } = [];
StaticAssetsManifestJsonContext.GetJsonTypeInfo.g.cs (2)
22if (type == typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)) 54if (type == typeof(global::System.Collections.Generic.List<global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor>))
StaticAssetsManifestJsonContext.ListStaticAssetDescriptor.g.cs (12)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.List<global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor>>? _ListStaticAssetDescriptor; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.List<global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor>> ListStaticAssetDescriptor 22get => _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>)); 25private 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) 27if (!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)) 29var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.List<global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor>> 31ObjectCreator = () => new global::System.Collections.Generic.List<global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor>(), 35jsonTypeInfo = 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); 45private void ListStaticAssetDescriptorSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.List<global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor>? value)
StaticAssetsManifestJsonContext.StaticAssetDescriptor.g.cs (36)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor>? _StaticAssetDescriptor; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor> StaticAssetDescriptor 22get => _StaticAssetDescriptor ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor>)Options.GetTypeInfo(typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor> Create_StaticAssetDescriptor(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor> jsonTypeInfo)) 29var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor> 35ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null), 39jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor>(options, objectInfo); 56DeclaringType = typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor), 58Getter = static obj => ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)obj).Route, 59Setter = static (obj, value) => ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)obj).Route = value!, 66AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor).GetProperty("Route", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 79DeclaringType = typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor), 81Getter = static obj => ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)obj).AssetPath, 82Setter = static (obj, value) => ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)obj).AssetPath = value!, 89AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor).GetProperty("AssetPath", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 102DeclaringType = typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor), 104Getter = static obj => ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)obj).Selectors, 105Setter = static (obj, value) => ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)obj).Selectors = value!, 112AttributeProviderFactory = 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), 124DeclaringType = typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor), 126Getter = static obj => ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)obj).Properties, 127Setter = static (obj, value) => ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)obj).Properties = value!, 134AttributeProviderFactory = 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), 146DeclaringType = typeof(global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor), 148Getter = static obj => ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)obj).ResponseHeaders, 149Setter = static (obj, value) => ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)obj).ResponseHeaders = value!, 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), 168private void StaticAssetDescriptorSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor? value) 178writer.WriteString(PropName_Route, ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)value).Route); 179writer.WriteString(PropName_AssetFile, ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)value).AssetPath); 181IReadOnlyListStaticAssetSelectorSerializeHandler(writer, ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)value).Selectors); 183IReadOnlyListStaticAssetPropertySerializeHandler(writer, ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)value).Properties); 185IReadOnlyListStaticAssetResponseHeaderSerializeHandler(writer, ((global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor)value).ResponseHeaders);
StaticAssetsManifestJsonContext.StaticAssetsManifest.g.cs (3)
93var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.List<global::Microsoft.AspNetCore.StaticAssets.StaticAssetDescriptor>> 108AttributeProviderFactory = 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), 111properties[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)
211var descriptor = descriptors[0]; 268var descriptor = descriptors[0];