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. |