Interface IMetadataSource
For querying metadata from the data source. Mainly used in the Store, Cache-Systems and Apps.
[InternalApi_DoNotUse_MayChangeWithoutNotice("this is just fyi")]
public interface IMetadataSource
Remarks
- Was renamed from
IMetadataGettoIMetadataSourcein v20 to better reflect its purpose.
Methods
GetMetadata<TKey>(int, TKey, string?)
Get any metadata from the current data source (usually an app)
IEnumerable<IEntity> GetMetadata<TKey>(int targetType, TKey key, string? contentTypeName = null)
Parameters
targetTypeintThe type-id of the target we're accessing, like 10=cms-object, 4=entity
keyTKeyThe key which is used for lookup
contentTypeNamestringOptional content-type name, to only retrieve metadata of that type
Returns
- IEnumerable<IEntity>
A list (can be empty) of metadata items found for this target
Type Parameters
TKeyKey-Type used - string, int or guid
Remarks
It does not return metadata describing the source (app), but metadata stored in this app, describing something else.
GetMetadata<TKey>(TargetTypes, TKey, string?)
Get any metadata from the current data source (usually an app)
IEnumerable<IEntity> GetMetadata<TKey>(TargetTypes targetType, TKey key, string? contentTypeName = null)
Parameters
targetTypeTargetTypesThe TargetTypes constant of the target we're accessing, like TargetTypes.Entity
keyTKeyThe key which is used for lookup
contentTypeNamestringOptional content-type name, to only retrieve metadata of that type
Returns
- IEnumerable<IEntity>
A list (can be empty) of metadata items found for this target
Type Parameters
TKeyKey-Type used - string, int or guid
Remarks
It does not return metadata describing the source (app), but metadata stored in this app, describing something else.