docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class MetadataQuery

    Allows building a metadata query using a fluent API.

    Inheritance
    object
    MetadataQuery
    Implements
    IAsyncEnumerable<MetadataInstance>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Cloud.Metadata
    Assembly: Unity.Cloud.Metadata.dll
    Syntax
    public class MetadataQuery : IAsyncEnumerable<MetadataInstance>

    Methods

    Select(MetadataPathCollection)

    Adds the desired output fields to the query.

    Declaration
    public MetadataQuery Select(MetadataPathCollection paths)
    Parameters
    Type Name Description
    MetadataPathCollection paths

    Adds those fields to the query.

    Returns
    Type Description
    MetadataQuery

    The called MetadataQuery

    Select(MetadataPathCollection, OptionalData)

    Adds the desired output fields to the query.

    Declaration
    public MetadataQuery Select(MetadataPathCollection paths, OptionalData optionalData)
    Parameters
    Type Name Description
    MetadataPathCollection paths

    Adds those fields to the query.

    OptionalData optionalData

    Restrict optional data to include only the specified fields. Everything is included by default.

    Returns
    Type Description
    MetadataQuery

    The called MetadataQuery

    WhereFieldEquals(MetadataPath, string)

    Adds metadata conditions to the query where the given path. value must equals the given value.

    Declaration
    public MetadataQuery WhereFieldEquals(MetadataPath path, string value)
    Parameters
    Type Name Description
    MetadataPath path

    The field path in the metadata to validate its value equals the given value.

    string value

    The value that the field needs to be equals to.

    Returns
    Type Description
    MetadataQuery

    The called MetadataQuery

    WhereFieldExists(MetadataPath)

    Adds metadata conditions to the query where the given path has a value.

    Declaration
    public MetadataQuery WhereFieldExists(MetadataPath path)
    Parameters
    Type Name Description
    MetadataPath path

    Search for MetadataInstance which has this key.

    Returns
    Type Description
    MetadataQuery

    The called MetadataQuery

    WhereFieldNotEquals(MetadataPath, string)

    Adds metadata conditions to the query where the given path. value must NOT equals the given value.

    Declaration
    public MetadataQuery WhereFieldNotEquals(MetadataPath path, string value)
    Parameters
    Type Name Description
    MetadataPath path

    The path in the metadata to validate its value equals the given value.

    string value

    The value that the field needs to be equals to.

    Returns
    Type Description
    MetadataQuery

    The called MetadataQuery

    WhereFieldNotExists(MetadataPath)

    Adds metadata conditions to the query where the given path has no value assigned.

    Declaration
    public MetadataQuery WhereFieldNotExists(MetadataPath path)
    Parameters
    Type Name Description
    MetadataPath path

    Search for MetadataInstance which doesn't have this key.

    Returns
    Type Description
    MetadataQuery

    The called MetadataQuery

    WhereHasAncestor(InstanceId)

    Restricts the query to only return instances that have a specific ancestor.

    Declaration
    public MetadataQuery WhereHasAncestor(InstanceId ancestor)
    Parameters
    Type Name Description
    InstanceId ancestor

    This ancestor must be part of the MetadataInstanceancestors.

    Returns
    Type Description
    MetadataQuery

    The called MetadataQuery.

    WhereHasAncestor(InstanceId, int)

    Restricts the query to only return instances that have a specific ancestor.

    Declaration
    public MetadataQuery WhereHasAncestor(InstanceId ancestor, int maxDepth)
    Parameters
    Type Name Description
    InstanceId ancestor

    This ancestor must be part of the MetadataInstance ancestors.

    int maxDepth

    Stop the recurring search beyond this level of depth.

    Returns
    Type Description
    MetadataQuery

    The called MetadataQuery.

    WhereInstanceEquals(IEnumerable<InstanceId>)

    Adds the owner IDs to the lookup query.

    Declaration
    public MetadataQuery WhereInstanceEquals(IEnumerable<InstanceId> instanceIds)
    Parameters
    Type Name Description
    IEnumerable<InstanceId> instanceIds

    The owners' ids

    Returns
    Type Description
    MetadataQuery

    The called MetadataQuery

    WhereInstanceEquals(IEnumerable<InstanceId>, QueryOptions)

    Adds the owner IDs to the lookup query.

    Declaration
    public MetadataQuery WhereInstanceEquals(IEnumerable<InstanceId> instanceIds, QueryOptions options)
    Parameters
    Type Name Description
    IEnumerable<InstanceId> instanceIds

    The owners' ids

    QueryOptions options

    Alter the behavior of the MetadataQuery with these options.

    Returns
    Type Description
    MetadataQuery

    The called MetadataQuery

    WhereInstanceEquals(params InstanceId[])

    Adds the owner IDs to the lookup query.

    Declaration
    public MetadataQuery WhereInstanceEquals(params InstanceId[] instanceIds)
    Parameters
    Type Name Description
    InstanceId[] instanceIds

    The owners' ids

    Returns
    Type Description
    MetadataQuery

    The called MetadataQuery

    Implements

    IAsyncEnumerable<T>

    Extension Methods

    AsyncEnumerableExtensions.GetFirstOrDefaultAsync<T>(IAsyncEnumerable<T>, CancellationToken)
    AsyncEnumerableExtensions.GetFirstOrDefaultAsync<T>(IAsyncEnumerable<T>, CancellationToken)
    AsyncEnumerableExtensions.ToDictionaryAsync<TSource, TKey, TElement>(IAsyncEnumerable<TSource>, Func<TSource, TKey>, Func<TSource, TElement>, CancellationToken)
    AsyncEnumerableExtensions.ToDictionaryAsync<TSource, TKey, TElement>(IAsyncEnumerable<TSource>, Func<TSource, TKey>, Func<TSource, TElement>, CancellationToken)
    AsyncEnumerableExtensions.ToListAsync<T>(IAsyncEnumerable<T>, CancellationToken)
    AsyncEnumerableExtensions.ToListAsync<T>(IAsyncEnumerable<T>, CancellationToken)
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)