Interface ISearchService<T>
An interface to provide access to a search service.
Namespace: Gorgon.Editor.Services
Assembly: Gorgon.Editor.API.dll
Syntax
public interface ISearchService<out T> where T : IGorgonNamedObject
Type Parameters
Name | Description |
---|---|
T | The type of object being searched, must implement IGorgonNamedObject. |
Methods
| Edit this page View SourceMapKeywordToContentAttribute(string, string)
Function to map a custom search keyword to a content attribute to allow for searching of content specific keywords.
Declaration
void MapKeywordToContentAttribute(string keyword, string attribute)
Parameters
Type | Name | Description |
---|---|---|
string | keyword | The keyword that the user will input. |
string | attribute | The attribute in the content to map to. |
Search(string)
Function to perform the actual search.
Declaration
IEnumerable<out T> Search(string searchText)
Parameters
Type | Name | Description |
---|---|---|
string | searchText | The text to search for. |
Returns
Type | Description |
---|---|
IEnumerable<T> | A list of items that match the search, or null search should be disabled, or an empty list if no matches were found. |