EditorSearchOptions Class
Stores find/replace options for searching within a view.
public class EditorSearchOptions : IEditorSearchOptions, ISearchOptions, ICloneable
- Inheritance:
- object object
- Implements:
- IEditorSearchOptions ISearchOptions ICloneable
Constructors
EditorSearchOptions()
Initializes an instance of the class.
public EditorSearchOptions()
Properties
Default
Gets the default IEditorSearchOptions instance that is generally shared among multiple editors.
public static IEditorSearchOptions Default { get; }
Property Value
- IEditorSearchOptions:
The default IEditorSearchOptions instance that is generally shared among multiple editors.
FindText
Gets or sets the text to find.
MatchCase
Gets or sets whether searches should be case sensitive.
public bool MatchCase { get; set; }
Property Value
- bool:
true
if searches should be case sensitive; otherwise,false
.
MatchWholeWord
Gets or sets 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
Gets or sets the maximum number of results that can be found.
public int MaximumResultCount { get; set; }
Property Value
- int:
The maximum number of results that can be found.
Remarks
The count must be larger than zero.
PatternProvider
Gets or sets the search pattern provider (normal, regular expression, wildcard, etc.).
public ISearchPatternProvider PatternProvider { get; set; }
Property Value
- ISearchPatternProvider:
A ISearchPatternProvider specifying the search pattern provider.
ReplaceText
Gets or sets the text with which to replace.
Scope
Gets or sets an EditorSearchScope that indicates the scope in which to search.
public EditorSearchScope Scope { get; set; }
Property Value
- EditorSearchScope:
An EditorSearchScope that indicates the scope in which to search.
SearchUp
Gets or sets 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.
Equals(object)
public override bool Equals(object obj)
Parameter | Type | Description |
---|---|---|
obj | object |
Returns
Exceptions
Type | Condition |
---|---|
NullReferenceException | The |
GetHashCode()
Serves as a hash function for a particular type.
NotifyPropertyChanged(string)
Notifies that a property's value has changed.
protected void NotifyPropertyChanged(string name)
Parameter | Type | Description |
---|---|---|
name | string | The name of the property. |
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
.
Events
PropertyChanged
Occurs when a property value is changed.