Interface ITypedMetadata
Metadata on Dynamic Objects - like IDynamicEntity or IAsset (files/folders).
[InternalApi_DoNotUse_MayChangeWithoutNotice("The name can change, but the APIs are safe to use.")]
public interface ITypedMetadata : IHasMetadata, ITypedItem, ITyped, IEquatable<ITypedItem>, ICanDebug, IHasDecorators<IEntity>, IMultiWrapper<IEntity>
- Inherited Members
Remarks
Behaves like a normal DynamicEntity, but has additional commands to detect if specific Metadata exists.
History:
- Added in v13
- Made compatible to ITypedItem in 16.02 to allow typed commands such as
.String(...)
- Renamed in v16.02 from
IDynamicMetadata
toIMetadata
since it's not necessarilydynamic
any more (but still supportsdynamic
where needed) Note that this is a breaking change, but we believe the type is never directly mentioned in any code - Renamed in v20 to
ITypedMetadata
fromIMetadata
because it kept on causing confusions
Methods
HasType(string)
Ask if there is metadata of the type specified. This is important in scenarios where an item could have a lot of metadata, but we only want one specific type to look at.
bool HasType(string type)
Parameters
type
string
Returns
- bool
true
if metadata of that type exists
OfType(string)
Get all the metadata Entities of a specific type.
IEnumerable<IEntity> OfType(string type)
Parameters
type
string