Struct QueryFilterOperator
A QueryFilterOperator defines a boolean operator between a value returned by a filter and an operand inputted in the search query.
Namespace: UnityEditor.Search
Syntax
public readonly struct QueryFilterOperator
Properties
token
The operator identifier.
Declaration
public readonly string token { get; }
Property Value
Type | Description |
---|---|
String |
valid
Indicates if this QueryFilterOperator is valid.
Declaration
public readonly bool valid { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
AddHandler<TFilterVariable, TFilterConstant>(Func<TFilterVariable, TFilterConstant, Boolean>)
Adds a custom filter operator handler.
Declaration
public readonly QueryFilterOperator AddHandler<TFilterVariable, TFilterConstant>(Func<TFilterVariable, TFilterConstant, bool> handler)
Parameters
Type | Name | Description |
---|---|---|
Func<TFilterVariable, TFilterConstant, Boolean> | handler | Callback to handle the operation. Takes a TFilterVariable (value returned by the filter handler, will vary for each element) and a TFilterConstant (right hand side value of the operator, which is constant), and returns a boolean indicating if the filter passes or not. |
Returns
Type | Description |
---|---|
QueryFilterOperator |
Type Parameters
Name | Description |
---|---|
TFilterVariable | The operator's left hand side type. This is the type returned by a filter handler. |
TFilterConstant | The operator's right hand side type. |
AddHandler<TFilterVariable, TFilterConstant>(Func<TFilterVariable, TFilterConstant, StringComparison, Boolean>)
Adds a custom filter operator handler.
Declaration
public readonly QueryFilterOperator AddHandler<TFilterVariable, TFilterConstant>(Func<TFilterVariable, TFilterConstant, StringComparison, bool> handler)
Parameters
Type | Name | Description |
---|---|---|
Func<TFilterVariable, TFilterConstant, StringComparison, Boolean> | handler | Callback to handle the operation. Takes a TFilterVariable (value returned by the filter handler, will vary for each element), a TFilterConstant (right hand side value of the operator, which is constant), a StringComparison option and returns a boolean indicating if the filter passes or not. |
Returns
Type | Description |
---|---|
QueryFilterOperator |
Type Parameters
Name | Description |
---|---|
TFilterVariable | The operator's left hand side type. This is the type returned by a filter handler. |
TFilterConstant | The operator's right hand side type. |