SearchEngine Class

Represents the core searching component.

Definition

Namespace: Mythicsoft.Search.Core
Assembly: Mythicsoft.Search.Core (in Mythicsoft.Search.Core.dll) Version: 9.3.830.1
C#
public class SearchEngine : IDisposable
Inheritance
Object    SearchEngine
Implements
IDisposable

Remarks

A search is started by calling the Start(SearchCriteria, Boolean) method with a SearchCriteria instance. The results from the search are available via the SearchResultItems property or through the SearchResultItemCollection passed to the OnFileFound event.

You can also use SearchEngine to search through a given string using the SearchText(SearchCriteria, String) method.

Example

C#
SearchFileSystemCriteria criteria    = new SearchFileSystemCriteria();
criteria.FileNameExprType            = ExpressionType.DosExp;
criteria.FileName                    = "*.txt";
criteria.ContainingText              = "SearchFor";
criteria.LookIn                      = "C:\\";

criteria.ApplyChanges();
engine.Start(criteria, false);

Constructors

SearchEngineInitializes a new instance of the SearchEngine class

Properties

SearchResultItems The list of found SearchResultItem objects for the current search.

Methods

DisposeReleases all resources used by the SearchEngine
Dispose(Boolean)Releases the unmanaged resources used by the SearchEngine and optionally releases the managed resources
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Finalize Non-GC class clean up
(Overrides ObjectFinalize)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
SearchText Search a string for the given criteria.
Start Starts a new search
Stop Stops a currently running search.
ToStringReturns a string that represents the current object.
(Inherited from Object)
Unlock Provide registration information to the search engine. Used when regkey.xml file not available.

Events

OnFileFound Occurs when one or more files are found. If multiple files are found within a short interval they are grouped into a single OnFileFound message.
OnProgress Occurs during the search providing progress information.
OnSearchFinished Occurs when the search has finished.
OnSearchStarted Occurs when the search starts.

See Also