In This Article

EditorSearchOptions Class

Stores find/replace options for searching within a view.

public class EditorSearchOptions : ObservableObjectBase, IEditorSearchOptions, ISearchOptions, ICloneable
Inheritance:
object ObservableObjectBase object
Implements:
IEditorSearchOptions ISearchOptions ICloneable

Constructors

EditorSearchOptions()

Initializes an instance of the class.

public EditorSearchOptions()

Properties

Default

The default IEditorSearchOptions instance that is generally shared among multiple editors.

public static IEditorSearchOptions Default { get; }

Property Value

IEditorSearchOptions

FindText

The text to find.

public string FindText { get; set; }

Property Value

string

MatchCase

Indicates whether searches should be case sensitive.

public bool MatchCase { get; set; }

Property Value

bool:

true if searches should be case sensitive; otherwise, false.

MatchWholeWord

Indicates whether searches should only match whole words.

public bool MatchWholeWord { get; set; }

Property Value

bool:

true if searches should only match whole words; otherwise, false.

MaximumResultCount

The maximum number of results that can be found.

public int MaximumResultCount { get; set; }

Property Value

int

Remarks

The count must be larger than zero.

PatternProvider

The search pattern provider (normal, regular expression, wildcard, etc.).

public ISearchPatternProvider PatternProvider { get; set; }

Property Value

ISearchPatternProvider

ReplaceText

The text with which to replace (replace operations only).

public string ReplaceText { get; set; }

Property Value

string

Scope

An EditorSearchScope that indicates the scope in which to search.

public EditorSearchScope Scope { get; set; }

Property Value

EditorSearchScope

SearchUp

Indicates whether to search backwards.

public bool SearchUp { get; set; }

Property Value

bool:

true if searches should be performed backwards; otherwise, false.

Methods

Clone()

Creates a new object that is a copy of the current instance.

public virtual object Clone()

Returns

object:

A new instance of EditorSearchOptions that is a clone of the original.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)
Parameter Type Description
obj object

The object to compare with the current object.

Returns

bool:

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int:

A hash code for the current object.

ResetFindText()

Resets the FindText property to its default value.

public void ResetFindText()

ResetMatchCase()

Resets the MatchCase property to its default value.

public void ResetMatchCase()

ResetMatchWholeWord()

Resets the MatchWholeWord property to its default value.

public void ResetMatchWholeWord()

ResetMaximumResultCount()

Resets the MaximumResultCount property to its default value.

public void ResetMaximumResultCount()

ResetPatternProvider()

Resets the PatternProvider property to its default value.

public void ResetPatternProvider()

ResetReplaceText()

Resets the ReplaceText property to its default value.

public void ResetReplaceText()

ResetScope()

Resets the Scope property to its default value.

public void ResetScope()

ResetSearchUp()

Resets the SearchUp property to its default value.

public void ResetSearchUp()

ShouldSerializeFindText()

Indicates whether the FindText property should be persisted.

public bool ShouldSerializeFindText()

Returns

bool:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeMatchCase()

Indicates whether the MatchCase property should be persisted.

public bool ShouldSerializeMatchCase()

Returns

bool:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeMatchWholeWord()

Indicates whether the MatchWholeWord property should be persisted.

public bool ShouldSerializeMatchWholeWord()

Returns

bool:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeMaximumResultCount()

Indicates whether the MaximumResultCount property should be persisted.

public bool ShouldSerializeMaximumResultCount()

Returns

bool:

true if the property value has changed from its default; otherwise, false.

ShouldSerializePatternProvider()

Indicates whether the PatternProvider property should be persisted.

public bool ShouldSerializePatternProvider()

Returns

bool:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeReplaceText()

Indicates whether the ReplaceText property should be persisted.

public bool ShouldSerializeReplaceText()

Returns

bool:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeScope()

Indicates whether the Scope property should be persisted.

public bool ShouldSerializeScope()

Returns

bool:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeSearchUp()

Indicates whether the SearchUp property should be persisted.

public bool ShouldSerializeSearchUp()

Returns

bool:

true if the property value has changed from its default; otherwise, false.

Inherited Members

Extension Methods