public static class RunicAssetEndpointExtensions Maps a Runic Assets source to ASP.NET Core endpoints.
Methods
MapRunicAssetSource
public static IEndpointConventionBuilder MapRunicAssetSource(this IEndpointRouteBuilder endpoints, IAssetSource source, string routePrefix = "", AssetRoutingOptions? routing = null) Maps GET and HEAD below an optional route prefix. Request paths resolve with AssetManifest.TryResolveRequestPath, the same rules and defaults the Desktop adapter uses: the prefix root serves the entry point and missing extensionless paths fall back to it unless routing disables them. The endpoint matches only GET and HEAD requests for paths that resolve. It runs after the application's endpoints and before MapFallback, so other requests reach static files, a fallback or a 404. HTML assets carry AssetRoutingOptions.ContentSecurityPolicy when it is set.
WriteAssetAsync
public static Task WriteAssetAsync(this HttpContext context, IAssetSource source, AssetDescriptor descriptor) Writes one declared asset with its manifest-owned HTTP metadata: ETag, Cache-Control, conditional and range requests, and a text/* media type with ; charset=utf-8. Use it in a custom endpoint: await context.WriteAssetAsync(source, descriptor).