Table of Contents

Interface IMetadataSource

Namespace
ToSic.Eav.Metadata
Assembly
ToSic.Eav.Core.dll

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 : ICacheExpiring, ITimestamped, IAppIdentity, IZoneIdentity, IAppIdentityLight
Inherited Members

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

targetType int

The type-id of the target we're accessing, like 10=cms-object, 4=entity

key TKey

The key which is used for lookup

contentTypeName string

Optional content-type name, to only retrieve metadata of that type

Returns

IEnumerable<IEntity>

A list (may be empty) of metadata items found for this target

Type Parameters

TKey

Key-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

targetType TargetTypes

The TargetTypes constant of the target we're accessing, like TargetTypes.Entity

key TKey

The key which is used for lookup

contentTypeName string

Optional content-type name, to only retrieve metadata of that type

Returns

IEnumerable<IEntity>

A list (may be empty) of metadata items found for this target

Type Parameters

TKey

Key-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.