Share via


ITextSearchNavigator Interface

Navigates between search results on an ITextBuffer and performs text replacements.

Namespace:  Microsoft.VisualStudio.Text.Operations
Assembly:  Microsoft.VisualStudio.Text.Logic (in Microsoft.VisualStudio.Text.Logic.dll)

Syntax

'Declaration
Public Interface ITextSearchNavigator
public interface ITextSearchNavigator
public interface class ITextSearchNavigator
type ITextSearchNavigator =  interface end
public interface ITextSearchNavigator

The ITextSearchNavigator type exposes the following members.

Properties

  Name Description
Public property CurrentResult Gets the SnapshotSpan corresponding to the result of the last find operation.
Public property ReplaceTerm Gets or sets the term to use to replace matches.
Public property SearchOptions Gets or sets options to use for a search.
Public property SearchSpan Gets or sets the range of text to search.
Public property SearchTerm Gets or sets the term to search for.
Public property StartPoint Gets or sets the position at which the search is started.

Top

Methods

  Name Description
Public method ClearCurrentResult Clears the current result.
Public method Find Finds the next occurrence of the text matching the SearchTerm.
Public method Replace Replaces the current result with the ReplaceTerm.

Top

Remarks

This interface is a Managed Extensibility Framework (MEF) part, you can get it by importing an ITextSearchNavigatorFactoryService and calling the CreateSearchNavigator method.

See Also

Reference

Microsoft.VisualStudio.Text.Operations Namespace