Gorgon
Show / Hide Table of Contents

Class EditorContentSearchService

A system used to search through the file system for files.

Inheritance
object
EditorContentSearchService
Implements
ISearchService<IContentFileExplorerSearchEntry>
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Gorgon.Editor.Services
Assembly: Gorgon.Editor.API.dll
Syntax
public class EditorContentSearchService : ISearchService<IContentFileExplorerSearchEntry>

Constructors

| Edit this page View Source

EditorContentSearchService(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 rows parameter is null.

Methods

| Edit this page View Source

MapKeywordToContentAttribute(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 keyword, or the attribute parameter is null.

ArgumentEmptyException

Thrown when the keyword, or the attribute parameter is empty.

| Edit this page View Source

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.

Implements

ISearchService<T>

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author