5 instantiations of ResourceAsset
Microsoft.AspNetCore.Components.Endpoints (3)
_generated\8\ResourceCollectionSerializerContext.ResourceAsset.g.cs (1)
34ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.AspNetCore.Components.ResourceAsset((string)args[0], (global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.Components.ResourceAssetProperty>)args[1]),
src\aspnetcore\src\Shared\Components\ResourceCollectionResolver.cs (2)
196resources.Add(new ResourceAsset(descriptor.Route, properties)); 200resources.Add(new ResourceAsset(descriptor.Route, null));
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
src\aspnetcore\src\Shared\Components\ResourceCollectionResolver.cs (2)
196resources.Add(new ResourceAsset(descriptor.Route, properties)); 200resources.Add(new ResourceAsset(descriptor.Route, null));
62 references to ResourceAsset
Microsoft.AspNetCore.Components (13)
ResourceAssetCollection.cs (13)
12public sealed class ResourceAssetCollection : IReadOnlyList<ResourceAsset> 19private readonly FrozenDictionary<string, ResourceAsset> _uniqueUrlMappings; 21private readonly IReadOnlyList<ResourceAsset> _resources; 27public ResourceAssetCollection(IReadOnlyList<ResourceAsset> resources) 29var mappings = new Dictionary<string, ResourceAsset>(StringComparer.OrdinalIgnoreCase); 32foreach (var resource in resources) 38if (mappings.TryGetValue(property.Value, out var value)) 57public string this[string key] => _uniqueUrlMappings.TryGetValue(key, out var value) ? value.Url : key; 67ResourceAsset IReadOnlyList<ResourceAsset>.this[int index] => _resources[index]; 68int IReadOnlyCollection<ResourceAsset>.Count => _resources.Count; 69IEnumerator<ResourceAsset> IEnumerable<ResourceAsset>.GetEnumerator() => _resources.GetEnumerator();
Microsoft.AspNetCore.Components.Endpoints (47)
_generated\11\ResourceCollectionSerializerContext.IReadOnlyListResourceAsset.g.cs (12)
15private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.Components.ResourceAsset>>? _IReadOnlyListResourceAsset; 21public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.Components.ResourceAsset>> IReadOnlyListResourceAsset 24get => _IReadOnlyListResourceAsset ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.Components.ResourceAsset>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.Components.ResourceAsset>)); 27private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.Components.ResourceAsset>> Create_IReadOnlyListResourceAsset(global::System.Text.Json.JsonSerializerOptions options) 29if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.Components.ResourceAsset>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.Components.ResourceAsset>> jsonTypeInfo)) 31var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.Components.ResourceAsset>> 39jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateIEnumerableInfo<global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.Components.ResourceAsset>, global::Microsoft.AspNetCore.Components.ResourceAsset>(options, info); 49private void IReadOnlyListResourceAssetSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.Components.ResourceAsset>? value) 59foreach (global::Microsoft.AspNetCore.Components.ResourceAsset element in value)
_generated\15\ResourceCollectionSerializerContext.GetJsonTypeInfo.g.cs (2)
24if (type == typeof(global::Microsoft.AspNetCore.Components.ResourceAsset)) 36if (type == typeof(global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.Components.ResourceAsset>))
_generated\8\ResourceCollectionSerializerContext.ResourceAsset.g.cs (19)
15private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.ResourceAsset>? _ResourceAsset; 21public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.ResourceAsset> ResourceAsset 24get => _ResourceAsset ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.ResourceAsset>)Options.GetTypeInfo(typeof(global::Microsoft.AspNetCore.Components.ResourceAsset)); 27private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.ResourceAsset> Create_ResourceAsset(global::System.Text.Json.JsonSerializerOptions options) 29if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.AspNetCore.Components.ResourceAsset>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.ResourceAsset> jsonTypeInfo)) 31var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.AspNetCore.Components.ResourceAsset> 37ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ResourceAsset).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.Components.ResourceAssetProperty>)}, modifiers: null), 43jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.AspNetCore.Components.ResourceAsset>(options, objectInfo); 60DeclaringType = typeof(global::Microsoft.AspNetCore.Components.ResourceAsset), 62Getter = static obj => ((global::Microsoft.AspNetCore.Components.ResourceAsset)obj).Url, 70AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ResourceAsset).GetProperty("Url", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 81DeclaringType = typeof(global::Microsoft.AspNetCore.Components.ResourceAsset), 83Getter = static obj => ((global::Microsoft.AspNetCore.Components.ResourceAsset)obj).Properties, 91AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ResourceAsset).GetProperty("Properties", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.Components.ResourceAssetProperty>), global::System.Array.Empty<global::System.Type>(), null), 101private void ResourceAssetSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.Components.ResourceAsset? value) 111string __value_Url = ((global::Microsoft.AspNetCore.Components.ResourceAsset)value).Url; 116global::System.Collections.Generic.IReadOnlyList<global::Microsoft.AspNetCore.Components.ResourceAssetProperty> __value_Properties = ((global::Microsoft.AspNetCore.Components.ResourceAsset)value).Properties;
_generated\9\ResourceCollectionSerializerContext.ResourceAssetCollection.g.cs (2)
39jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateIEnumerableInfo<global::Microsoft.AspNetCore.Components.ResourceAssetCollection, global::Microsoft.AspNetCore.Components.ResourceAsset>(options, info); 59foreach (global::Microsoft.AspNetCore.Components.ResourceAsset element in value)
Assets\ImportMapDefinition.cs (2)
59foreach (var asset in assets) 85private static (string? integrity, string? label) GetAssetProperties(ResourceAsset asset)
Builder\ResourceCollectionUrlEndpoint.cs (5)
102JsonSerializer.Serialize<IReadOnlyList<ResourceAsset>>(utf8Writer, resourceCollection, ResourceCollectionSerializerContext.Default.Options); 114var resources = (IReadOnlyList<ResourceAsset>)resourceCollection; 119foreach (var resource in resources) 139private static string? GetAdditionalDataForFingerprint(ResourceAsset resource) 193[JsonSerializable(typeof(IReadOnlyList<ResourceAsset>))]
Builder\ResourcePreloadCollection.cs (1)
14foreach (var asset in assets)
src\aspnetcore\src\Components\Shared\src\ResourceCollectionProvider.cs (2)
48[DynamicDependency(JsonSerialized, typeof(ResourceAsset))] 60var result = await module.InvokeAsync<ResourceAsset[]>("get");
src\aspnetcore\src\Shared\Components\ResourceCollectionResolver.cs (2)
34var resources = new List<ResourceAsset>(); 136List<ResourceAsset> resources,
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
src\aspnetcore\src\Shared\Components\ResourceCollectionResolver.cs (2)
34var resources = new List<ResourceAsset>(); 136List<ResourceAsset> resources,