Class EditorContentSearchService
A system used to search through the file system for files.
Implements
Inherited Members
Namespace: Gorgon.Editor.Services
Assembly: Gorgon.Editor.API.dll
Syntax
public class EditorContentSearchService : ISearchService<IContentFileExplorerSearchEntry>
Constructors
| Edit this page View SourceEditorContentSearchService(IReadOnlyList<IContentFileExplorerSearchEntry>)
Initializes a new instance of the EditorContentSearchService class.
Declaration
public EditorContentSearchService(IReadOnlyList<IContentFileExplorerSearchEntry> rows)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyList<IContentFileExplorerSearchEntry> | rows | The list of rows from the data grid containing the editor files. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
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
public 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. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
ArgumentEmptyException | Thrown when the |
Search(string)
Function to perform the actual search.
Declaration
public IEnumerable<IContentFileExplorerSearchEntry> Search(string searchText)
Parameters
Type | Name | Description |
---|---|---|
string | searchText | The text to search for. |
Returns
Type | Description |
---|---|
IEnumerable<IContentFileExplorerSearchEntry> | A list of items that match the search, or null search should be disabled, or an empty list if no matches were found. |