Allows to easyly load assets.
Initializes a new instance of AssetStore.
public Void AssetStore(baseDirectory)
Name | Type | Summary |
---|---|---|
baseDirectory | String | The base directory where the assets are stored. |
Type | Summary |
---|---|
ArgumentNullOrEmptyException | Thrown when baseDirectory is null or empty. |
DirectoryNotFoundException | Thrown when the directory does not exists. |
Loads a localized asset as a string with an html extension.
public Task<String> LoadAssetAsStringAsync(assetsRoot, fileName)
A string with the asset contents.
Name | Type | Summary |
---|---|---|
assetsRoot | String | Root folder. |
fileName | String | Asset file name. |
Type | Summary |
---|---|
ArgumentNullOrEmptyException | Thrown when assetsRoot is null or empty. |
ArgumentNullOrEmptyException | Thrown when fileName is null or empty. |
Loads a localized asset as a string.
public Task<String> LoadAssetAsStringAsync(assetsRoot, fileName, extension)
A string with the asset contents.
Name | Type | Summary |
---|---|---|
assetsRoot | String | Root folder. |
fileName | String | Asset file name. |
extension | String | Asset file extension. |
Type | Summary |
---|---|
ArgumentNullOrEmptyException | Thrown when assetsRoot is null or empty. |
ArgumentNullOrEmptyException | Thrown when fileName is null or empty. |
In this document