class
ResourceLibrary
public static abstract sealed class ResourceLibrary Keeps a library of all available Resource.
Methods
static T Get(Int32 identifier) Get a cached resource by its hash.
identifier — Resource hash to look up. static T Get(String filepath) Get a cached resource by its file path.
filepath — File path to the resource. static Boolean TryGet(String filepath, T resource) Try to get a cached resource by its file path.
filepath — File path to the resource. resource — The retrieved resource, if any. returns — True if resource was retrieved successfully.
static IEnumerable<T> GetAll() Get all cached resources of given type.
static IEnumerable<T> GetAll(String filepath, Boolean recursive = True) Get all cached resources of given type in a specific folder.
filepath — The path of the folder to check. recursive — Whether or not to check folders within the specified folder. static Task<T> LoadAsync(String path) Load a resource by its file path.
static Task<Bitmap> GetThumbnail(String path, Int32 width = 256, Int32 height = 256) Render a thumbnail for this resource