Class DocumentLoader
Definition
Namespace: StardewUI.Framework.Dom
Assembly: StardewUI.dll
Utility for loading Documents from memory or files.
Inheritance
Object ⇦ DocumentLoader
Members
Methods
Name | Description |
---|---|
LoadFromFile(FileInfo) | Loads a Document from markup in a file. |
TryLoadFromFileAsync(FileInfo) | Loads a Document from markup in a file using asynchronous I/O. |
Details
Methods
LoadFromFile(FileInfo)
Loads a Document from markup in a file.
Parameters
file
FileInfo
The file containing the document markup.
Returns
The parsed Document.
Remarks
This method is designed to be called from SMAPI's content loader, and throws exceptions normally associated with SMAPI's content pipeline.
TryLoadFromFileAsync(FileInfo)
Loads a Document from markup in a file using asynchronous I/O.
public static System.Threading.Tasks.Task<StardewUI.Framework.Dom.Document> TryLoadFromFileAsync(System.IO.FileInfo file);
Parameters
file
FileInfo
The file containing the document markup.
Returns
The parsed Document, or null
if the file does not exist or the markup contained in the file is invalid.