Interface IRootContentFileProvider
A composite file provider that searches for a valid 'wwwroot' directory containing static web assets (HTML, CSS, JS, images, etc.) required for Blazor applications. It probes known locations such as the entry assembly directory, executing assembly directory, and the current working directory. At runtime, it can dynamically include additional static assets from JSON manifest files typically generated during the build or deployment phase.
The 'wwwroot' folder conventionally serves as the root directory for static web files in ASP.NET and Blazor applications. It commonly includes client-side resources like CSS, JavaScript files, images, and fonts.
At runtime, additional asset files defined in JSON manifest files (e.g., generated by build tools or deployment scripts) can be dynamically added to the file provider to support modular or dynamically loaded web content.
Inherited Members
Namespace: PoeShared.Blazor.Wpf.Services
Assembly: PoeShared.Blazor.Wpf.dll
Syntax
public interface IRootContentFileProvider : IFileProvider
Methods
Name | Description |
---|---|
AddContentRoot(DirectoryInfo) | Dynamically adds a content root(wwwroot) directory at runtime. This is useful when static content needs to be provided from directories that weren't known or didn't exist at the application's startup. |
AddRuntimeAssetsFile(FileInfo) | Adds an individual runtime static asset file(.staticwebassets.runtime.json) to the composite file provider. Typically, these files are JSON manifests or configuration files generated at runtime, listing static assets that should become available to the Blazor application. |