Class SearchHandler<TData>
The built in search handler.
Namespace: Unity.Properties.UI
Syntax
public sealed class SearchHandler<TData> : object, ISearchHandler, ISearchQueryHandler<TData>
Type Parameters
Name | Description |
---|---|
TData |
Constructors
SearchHandler(SearchElement)
Initializes a new SearchHandler<TData> for the specified search element.
Declaration
public SearchHandler(SearchElement element)
Parameters
Type | Name | Description |
---|---|---|
SearchElement | element |
Remarks
The search handler is automatically registered to the given element.
Properties
MaxFrameProcessingTimeMs
The maximum amount of time in milliseconds to spend on filtering each frame.
Declaration
public int MaxFrameProcessingTimeMs { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Implements
Mode
The active search mode to use. SearchHandlerType.
Declaration
public SearchHandlerType Mode { get; set; }
Property Value
Type | Description |
---|---|
SearchHandlerType |
Implements
SearchDataBatchMaxSize
The maximum number of elements to process in each enumerator batch.
Declaration
public int SearchDataBatchMaxSize { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Implements
SearchDataType
Gets the strongly typed search data type.
Declaration
public Type SearchDataType { get; }
Property Value
Type | Description |
---|---|
Type |
Implements
Methods
SetSearchDataProvider(Func<IEnumerable<TData>>)
Sets the callback used to gather the search data.
Declaration
public void SetSearchDataProvider(Func<IEnumerable<TData>> getSearchDataFunc)
Parameters
Type | Name | Description |
---|---|---|
Func<IEnumerable<TData>> | getSearchDataFunc | The callback to be invoked when gathering search data. |
Stop()
Stops any currently running search.
Declaration
public void Stop()
Events
OnBeginSearch
Callback invoked when a new search is started.
Declaration
public event Action<ISearchQuery<TData>> OnBeginSearch
Event Type
Type | Description |
---|---|
Action<ISearchQuery<TData>> |
OnEndSearch
Callback invoked when a search is completed.
Declaration
public event Action<ISearchQuery<TData>> OnEndSearch
Event Type
Type | Description |
---|---|
Action<ISearchQuery<TData>> |
OnFilter
Callback invoked when receiving a batch of filtered data.
Declaration
public event Action<ISearchQuery<TData>, IEnumerable<TData>> OnFilter
Event Type
Type | Description |
---|---|
Action<ISearchQuery<TData>, IEnumerable<TData>> |
Explicit Interface Implementations
ISearchQueryHandler<TData>.HandleSearchQuery(ISearchQuery<TData>)
Declaration
void ISearchQueryHandler<TData>.HandleSearchQuery(ISearchQuery<TData> query)
Parameters
Type | Name | Description |
---|---|---|
ISearchQuery<TData> | query |