Interface IAssetContext
- Namespace
- Icy.Assets
- Assembly
- IcyUI.dll
Represents a generalized source to access assets from.
public interface IAssetContext
- Extension Methods
Properties
RootPath
Gets the root path for this context.
Uri RootPath { get; }
Property Value
Methods
Combine(string)
Combines the asset context instance with a relative path to produce a new local asset context.
IAssetContext Combine(string relativePath)
Parameters
relativePathstringA relative path to create a new context for.
Returns
- IAssetContext
New instance of the IAssetContext that refers to the combined path.
GetAbsolutePath(string?)
Gets the absolute path to the given relative path relative to this IAssetContext instance.
string GetAbsolutePath(string? relativePath = null)
Parameters
relativePathstringA relative path to make absolute path for.
Returns
- string
An absolute path for the specified path combination.
GetDataFormat(string?)
Tries to get data format of the resource specified by current asset context state.
string? GetDataFormat(string? relativePath = null)
Parameters
relativePathstringA relative path to get the format for.
Returns
- string
A string representing
MIME-type for the specified Uri or null in case when format cannot be determined.
IsAvailable(string?)
Checks if the path represented by the given relative path exists.
bool IsAvailable(string? relativePath = null)
Parameters
relativePathstringRelative path part for this context.
Returns
OpenStream(string?)
Opens a stream to the specified relative path.
Stream OpenStream(string? relativePath = null)
Parameters
relativePathstringOptional relative path to open the stream to.
Returns
OpenStreamAsync(string?)
Asynchronously opens a stream to the specified relative path.
Task<Stream> OpenStreamAsync(string? relativePath = null)
Parameters
relativePathstringOptional relative path to open the stream to.