IWordPatternProvider Interface

Definition

Provides the Word Pattern which determines boundaries between words. Instance of this type can be obtained by importing IWordPatternProviderFactory.

C#
public interface IWordPatternProvider

Remarks

This interface provides similar information as ITextStructureNavigator, however: ITextStructureNavigator provides extent of a word in a realized ITextSnapshot, as well as spans of its parent element and its surrounding elements. The data it produces is used to navigate the document using keyboard.

On the other hand, this interface provides an expression used to find extent of a word either in a realized snapshot or in an arbitrary string. This expression may be used in various features, for example, by completion to determine its boundaries.

Methods

GetWordPatternRegexAsync(SnapshotPoint, CancellationToken)

Provides a regular expression which matches whole words and is applicable at snapshotPoint.

Applies to

Produkt Verzie
Visual Studio SDK 2022