PhoenixmlDb.XSLT
PreloadedResources
Pre-fetched contents for URIs that the engine would otherwise need to fetch over the network synchronously (xsl:import, xsl:include, fn:doc()).
#PreloadedResources
Namespace: PhoenixmlDb.Xslt
Pre-fetched contents for URIs that the engine would otherwise need to fetch over the network synchronously (xsl:import, xsl:include, fn:doc()).
On runtimes that support thread blocking (server, desktop, CLI), the engine's HTTP loaders run an async call to completion synchronously. That's fine for those runtimes — but Blazor WebAssembly is single-threaded and cannot park a thread on a monitor wait, so the same code throws "Cannot wait on monitors on this runtime". To run on WASM, fetch the resources asynchronously in your host code (via with await, or via JS interop) and pass the contents through a instance to . The engine consults this cache before falling back to its synchronous HTTP loaders. On WASM, a cache miss for an absolute http(s) URI raises a clear engine exception that names the missing URI rather than the obscure runtime Cannot wait on monitors error.
#Properties
| Name | Description |
|---|---|
Count
|
Number of URIs registered. |
#Methods
#Add(Uri,String)
Adds for . Existing entries are overwritten.
#Clear
Clears all entries.
#Contains(Uri)
True if a pre-loaded entry exists for .
#CreateBrowserCacheMissException(Uri,String)
Helper used by the engine's HTTP loader fallbacks to surface a clear, actionable error when running on a runtime that cannot block the calling thread (Blazor WebAssembly).
#TryGet(Uri,String@)
Tries to retrieve the pre-loaded content for .