AssetStore

Allows to easyly load assets.

Namespace:
Inetdev.Web
Type:
Class
Public:
Yes
Protected:
No
Sealed:
No
Abstract:
No
Inherits from:
System.Object

Constructors

AssetStore

Initializes a new instance of AssetStore.

Signature:
public Void AssetStore(baseDirectory)
Parameters
Name Type Summary
baseDirectory String The base directory where the assets are stored.
Exceptions
Type Summary
ArgumentNullOrEmptyException Thrown when baseDirectory is null or empty.
DirectoryNotFoundException Thrown when the directory does not exists.

Methods

LoadAssetAsStringAsync

Loads a localized asset as a string with an html extension.

Signature:
public Task<String> LoadAssetAsStringAsync(assetsRoot, fileName)
Returns

A string with the asset contents.

Parameters
Name Type Summary
assetsRoot String Root folder.
fileName String Asset file name.
Exceptions
Type Summary
ArgumentNullOrEmptyException Thrown when assetsRoot is null or empty.
ArgumentNullOrEmptyException Thrown when fileName is null or empty.

LoadAssetAsStringAsync

Loads a localized asset as a string.

Signature:
public Task<String> LoadAssetAsStringAsync(assetsRoot, fileName, extension)
Returns

A string with the asset contents.

Parameters
Name Type Summary
assetsRoot String Root folder.
fileName String Asset file name.
extension String Asset file extension.
Exceptions
Type Summary
ArgumentNullOrEmptyException Thrown when assetsRoot is null or empty.
ArgumentNullOrEmptyException Thrown when fileName is null or empty.