Table of Contents

Class YamlAssetMetadata<T>

Namespace
Stride.Core.Assets.Yaml
Assembly
Stride.Core.Assets.dll

A container class to transfer metadata between the asset and the YAML serializer.

public class YamlAssetMetadata<T> : IEnumerable<KeyValuePair<YamlAssetPath, T>>, IEnumerable

Type Parameters

T

The type of metadata.

Inheritance
YamlAssetMetadata<T>
Implements
Extension Methods

Properties

Count

Gets the number of key/value pairs contained in the YamlAssetMetadata<T>

public int Count { get; }

Property Value

int

Methods

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<KeyValuePair<YamlAssetPath, T>> GetEnumerator()

Returns

IEnumerator<KeyValuePair<YamlAssetPath, T>>

An enumerator that can be used to iterate through the collection.

Remove(YamlAssetPath)

Removes attached metadata from the given YAML path.

public void Remove(YamlAssetPath path)

Parameters

path YamlAssetPath

The path at which to remove metadata.

Set(YamlAssetPath, T)

Attaches the given metadata value to the given YAML path.

public void Set(YamlAssetPath path, T value)

Parameters

path YamlAssetPath

The path at which to attach metadata.

value T

The metadata to attach.

TryGet(YamlAssetPath)

Tries to retrieve the metadata for the given path.

public T TryGet(YamlAssetPath path)

Parameters

path YamlAssetPath

The path at which to retrieve metadata.

Returns

T

The metadata attached to the given path, or the default value of T if no metadata is attached at the given path.