docs.unity3d.com
    Show / Hide Table of Contents

    Interface IQueryHandler<TData, TPayload>

    Interface for query handlers.

    Namespace: UnityEditor.Search
    Syntax
    public interface IQueryHandler<TData, in TPayload>
        where TPayload : class
    Type Parameters
    Name Description
    TData

    The filtered data type.

    TPayload

    The payload type.

    Methods

    Eval(TData)

    Implement this function to evaluate the query on a single element.

    Declaration
    bool Eval(TData element)
    Parameters
    Type Name Description
    TData element

    A single object to be tested.

    Returns
    Type Description
    Boolean

    True if the object passes the query, false otherwise.

    Eval(TPayload)

    Implement this function to evaluate the query on a payload.

    Declaration
    IEnumerable<TData> Eval(TPayload payload)
    Parameters
    Type Name Description
    TPayload payload

    The input data of the query.

    Returns
    Type Description
    IEnumerable<TData>

    An enumerable of type TData.

    Back to top
    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