docs.unity.cn
    Show / Hide Table of Contents

    Interface IMetadataCollection

    Interface to indicate that the class contains Metadata.

    Namespace: UnityEngine.Localization.Metadata
    Syntax
    public interface IMetadataCollection

    Properties

    MetadataEntries

    All Metadata entries contained in this collection.

    Declaration
    IList<IMetadata> MetadataEntries { get; }
    Property Value
    Type Description
    IList<IMetadata>

    Methods

    AddMetadata(IMetadata)

    Add the Metadata to the collection.

    Declaration
    void AddMetadata(IMetadata md)
    Parameters
    Type Name Description
    IMetadata md

    Contains(IMetadata)

    Returns true if the collection contains the Metadata.

    Declaration
    bool Contains(IMetadata md)
    Parameters
    Type Name Description
    IMetadata md
    Returns
    Type Description
    Boolean

    GetMetadata<TObject>()

    Returns the first Metadata of type TObject or null if one does not exist.

    Declaration
    TObject GetMetadata<TObject>()
        where TObject : IMetadata
    Returns
    Type Description
    TObject
    Type Parameters
    Name Description
    TObject

    A type that implements IMetadata

    GetMetadatas<TObject>()

    Returns a list of all Metadata`s that are of type TObject.

    Declaration
    IList<TObject> GetMetadatas<TObject>()
        where TObject : IMetadata
    Returns
    Type Description
    IList<TObject>
    Type Parameters
    Name Description
    TObject

    A type that implements IMetadata

    GetMetadatas<TObject>(IList<TObject>)

    Populates list with all Metadata`s that are of type TObject.

    Declaration
    void GetMetadatas<TObject>(IList<TObject> foundItems)
        where TObject : IMetadata
    Parameters
    Type Name Description
    IList<TObject> foundItems

    List to add the found types to.

    Type Parameters
    Name Description
    TObject

    A type that implements IMetadata

    RemoveMetadata(IMetadata)

    Removes the Metadata if it is in the collection.

    Declaration
    bool RemoveMetadata(IMetadata md)
    Parameters
    Type Name Description
    IMetadata md
    Returns
    Type Description
    Boolean

    True if the collection contained the Metadata.

    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on Thursday, October 28, 2021