Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    YamlAssetMetadata<T> Class

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

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

    System.Object → YamlAssetMetadata<T>
    Derived from YamlAssetMetadata<T>:

    public class YamlAssetMetadata<T> : IEnumerable<KeyValuePair<YamlAssetPath, T>>, IEnumerable
    Type 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()
    | Improve this Doc View Source

    Properties


    Count

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

    public int Count { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    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 T if no metadata is attached at the given path.

    | Improve this Doc View Source

    Explicit Interface Implementations


    IEnumerable.GetEnumerator()

    IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    EnumerableExtensions.IsNullOrEmpty(IEnumerable)
    EnumerableExtensions.ForEach<T>(IEnumerable, Action<T>)
    EnumerableExtensions.ForEach<T>(IEnumerable<T>, Action<T>)
    EnumerableExtensions.IndexOf<T>(IEnumerable<T>, Func<T, Boolean>)
    EnumerableExtensions.LastIndexOf<T>(IEnumerable<T>, Func<T, Boolean>)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation