Class AssetExtensions
- Namespace
- Icy.Assets
- Assembly
- IcyUI.dll
Provides some extension methods for the assets management.
public static class AssetExtensions
- Inheritance
-
AssetExtensions
- Inherited Members
Methods
TryGetResource(IResourceRegistry, string, out object?, Type?)
Tries to get the resource from the specified resource registry.
public static bool TryGetResource(this IResourceRegistry resources, string key, out object? result, Type? targetType = null)
Parameters
resourcesIResourceRegistryAn instance of the IResourceRegistry to access the specified resource.
keystringA key to access the specified resource.
resultobjectAn instance of the requested resource..
targetTypeTypeOptional type constraint for the requested resource.
Returns
TryGetResource<T>(IResourceRegistry, string, out T?)
Tries to get the resource from the specified resource registry.
public static bool TryGetResource<T>(this IResourceRegistry resources, string key, out T? result) where T : class
Parameters
resourcesIResourceRegistryAn instance of the IResourceRegistry to access the specified resource.
keystringA key to access the specified resource.
resultTAn instance of the requested resource.
Returns
Type Parameters
TType of the requested resource.