docs.unity3d.com
    Show / Hide Table of Contents

    Class MetadataQueryBuilder

    Allows building a fluent query to the metadata provider.

    Inheritance
    Object
    MetadataQueryBuilder
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Cloud.Metadata
    Syntax
    public class MetadataQueryBuilder

    Methods

    ExecuteAsync(CancellationToken)

    Executes the built query by calling the metadata provider.

    Declaration
    public async Task<MatchCollection> ExecuteAsync(CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    The cancellation token

    Returns
    Type Description
    Task<MatchCollection>

    The list of

    IncludedIn(InstanceId[])

    Adds the owner IDs to the lookup query.

    Declaration
    public MetadataQueryBuilder IncludedIn(params InstanceId[] instanceIds)
    Parameters
    Type Name Description
    InstanceId[] instanceIds

    The owners' ids

    Returns
    Type Description
    MetadataQueryBuilder

    The called MetadataQueryBuilder

    LimitTo(Int32)

    Specify the number of metadata record to return. Useful when the scene contains thousands of metadata entry, which can affect performance.

    Declaration
    public MetadataQueryBuilder LimitTo(int amount)
    Parameters
    Type Name Description
    Int32 amount

    The number of metadata record to return

    Returns
    Type Description
    MetadataQueryBuilder

    The called MetadataQueryBuilder

    Select(String[])

    Adds the desired output metadata keys to the query.

    Declaration
    public MetadataQueryBuilder Select(params string[] keys)
    Parameters
    Type Name Description
    String[] keys

    An array of wanted keys

    Returns
    Type Description
    MetadataQueryBuilder

    The called MetadataQueryBuilder

    SelectAll()

    Sets the query to return the full metadata.

    Declaration
    public MetadataQueryBuilder SelectAll()
    Returns
    Type Description
    MetadataQueryBuilder

    The called MetadataQueryBuilder

    SelectOnlyId()

    Sets the query to only return the owner ID.

    Declaration
    public MetadataQueryBuilder SelectOnlyId()
    Returns
    Type Description
    MetadataQueryBuilder

    The called MetadataQueryBuilder

    WhereKeyEquals(IEnumerable<String>, String)

    Adds metadata conditions to the query.

    Declaration
    public MetadataQueryBuilder WhereKeyEquals(IEnumerable<string> path, string value)
    Parameters
    Type Name Description
    IEnumerable<String> path

    A list representing the path of keys and sub-keys in the metadata

    String value

    The value that the last keys in the keyHierarchy needs to be equals to

    Returns
    Type Description
    MetadataQueryBuilder

    The called MetadataQueryBuilder

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023