Class SearchSelection
Class giving readonly access to the current list of selected items in QuickSearch.
Namespace: Unity.QuickSearch
Syntax
public class SearchSelection : IReadOnlyCollection<SearchItem>Constructors
SearchSelection(IList<Int32>, ISearchList)
Create a new SearchSelection
Declaration
public SearchSelection(IList<int> selection, ISearchList filteredItems)Parameters
| Type | Name | Description | 
|---|---|---|
| IList<Int32> | selection | Current list of selected SearchItem indices. | 
| ISearchList | filteredItems | List of SearchItem displayed in QuickSearch. | 
Properties
Count
How many items are selected.
Declaration
public int Count { get; }Property Value
| Type | Description | 
|---|---|
| Int32 | 
Methods
First()
Get the first selected item in the selection.
Declaration
public SearchItem First()Returns
| Type | Description | 
|---|---|
| SearchItem | First select item in selection. Returns null if no item are selected | 
GetEnumerator()
Get an enumerator on the currently selected SearchItems.
Declaration
public IEnumerator<SearchItem> GetEnumerator()Returns
| Type | Description | 
|---|---|
| IEnumerator<SearchItem> | Enumerator on the currently selected SearchItems. | 
Last()
Get the last selected item in the selection.
Declaration
public SearchItem Last()Returns
| Type | Description | 
|---|---|
| SearchItem | Last select item in selection. Returns null if no item are selected | 
MaxIndex()
Highest selected index of any item in the selection.
Declaration
public int MaxIndex()Returns
| Type | Description | 
|---|---|
| Int32 | Returns the highest selected index. | 
MinIndex()
Lowest selected index of any item in the selection.
Declaration
public int MinIndex()Returns
| Type | Description | 
|---|---|
| Int32 | Returns the lowest selected index. |