YamlAssetMetadata<T> Class
Namespace: Stride.Core.Assets.YamlAssembly: 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>>, IEnumerableType Parameters
| Name | Description | 
|---|---|
| T | The type of metadata. | 
| Name | Description | |
|---|---|---|
| Properties | ||
| Count | Gets the number of key/value pairs contained in the YamlAssetMetadata<T> | |
| Methods | ||
| GetEnumerator() | ||
| Remove(YamlAssetPath) | Removes attached metadata from the given YAML path. | |
| Set(YamlAssetPath, T) | Attaches the given metadata value to the given YAML path. | |
| TryGet(YamlAssetPath) | Tries to retrieve the metadata for the given path. | |
| Explicit Interface Implementations | ||
| IEnumerable.GetEnumerator() | ||
Properties
Count
Gets the number of key/value pairs contained in the YamlAssetMetadata<T>
public int Count { get; }Property Value
| Type | Description | 
|---|---|
| System.Int32 | 
Methods
GetEnumerator()
public IEnumerator<KeyValuePair<YamlAssetPath, T>> GetEnumerator()Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<YamlAssetPath, T>> | 
Remove(YamlAssetPath)
Removes attached metadata from the given YAML path.
public void Remove(YamlAssetPath path)Parameters
| Type | Name | Description | 
|---|---|---|
| YamlAssetPath | path | 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
| Type | Name | Description | 
|---|---|---|
| YamlAssetPath | path | The path at which to attach metadata. | 
| T | value | The metadata to attach. | 
TryGet(YamlAssetPath)
Tries to retrieve the metadata for the given path.
public T TryGet(YamlAssetPath path)Parameters
| Type | Name | Description | 
|---|---|---|
| YamlAssetPath | path | The path at which to retrieve metadata. | 
Returns
| Type | Description | 
|---|---|
| T | The metadata attached to the given path, or the default value of  | 
Explicit Interface Implementations
IEnumerable.GetEnumerator()
IEnumerator IEnumerable.GetEnumerator()Returns
| Type | Description | 
|---|---|
| System.Collections.IEnumerator |