Gorgon
Show / Hide Table of Contents

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 Source

MapKeywordToContentAttribute(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.

| Edit this page View Source

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.

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