Interface IAsset
Describes an ADAM (Automatic Digital Asset Management) asset.
This contains properties which both IFolder and IFile have in common.
Namespace: ToSic.Sxc.Adam
Assembly: ToSic.Sxc.dll
Syntax
[PublicApi_Stable_ForUseInYourCode]
public interface IAsset : IHasMetadata
Properties
| Improve this Doc View SourceHasMetadata
Informs the code if this asset has real metadata attached or not.
Declaration
bool HasMetadata { get; }
Property Value
Type | Description |
---|---|
System.Boolean | True if this asset has metadata, false if it doesn't (in which case the Metadata property still works, but won't deliver any real values) |
Metadata
List of metadata items - will automatically contain a fake item, even if no metadata exits to help in razor template etc.
Declaration
IDynamicMetadata Metadata { get; }
Property Value
Type | Description |
---|---|
IDynamicMetadata | An IDynamicEntity which contains the metadata, or an empty IDynamicEntity which still works if no metadata exists. |
Type
The type of this asset (folder, file, etc.)
Declaration
string Type { get; }
Property Value
Type | Description |
---|---|
System.String | "folder", "image", "document", "file" depending on what it is |
Url
The path to this asset as used from external access. Must be a full url beginning with a "/" like "/Portals/0/adam/..."
Declaration
string Url { get; }
Property Value
Type | Description |
---|---|
System.String | The url to this asset |