DefaultWordBreakFinder Class
Provides the default implementation of an object that finds word breaks within an ITextSnapshot.
public class DefaultWordBreakFinder : IWordBreakFinder
- Inheritance:
- object object
- Implements:
- IWordBreakFinder
Remarks
Instances of this object can be registered with an ISyntaxLanguage using the RegisterService(object, object) method. Once an instance is registered with the language for the IWordBreakFinder interface type, its features can be used by the language.
Constructors
DefaultWordBreakFinder()
Initializes an instance of the class.
public DefaultWordBreakFinder()
Properties
DefaultWordContainsAdditionalCharacters
The default CharClass for the WordContainsAdditionalCharacters property.
DefaultWordStandaloneCharacters
The default CharClass for the WordStandaloneCharacters property.
WordContainsAdditionalCharacters
The set of additional characters that can constitute the inside of a word, other than letters and digits.
public CharClass WordContainsAdditionalCharacters { get; set; }
Property Value
Remarks
The default value is the _ character.
WordStandaloneCharacters
The set of characters that are intended to be single character words.
public CharClass WordStandaloneCharacters { get; set; }
Property Value
Remarks
The default value is the set of .,()<>[]{}?!/:;'" characters.
Methods
FindCurrentWordEnd(TextSnapshotOffset)
Returns the ITextSnapshot offset of the word end character that occurs at or after the specified start offset.
public int FindCurrentWordEnd(TextSnapshotOffset snapshotOffset)
| Parameter | Type | Description |
|---|---|---|
| snapshotOffset | TextSnapshotOffset | The TextSnapshotOffset from which to start parsing. |
Returns
FindCurrentWordStart(TextSnapshotOffset)
Returns the ITextSnapshot offset of the word start character that occurs at or before the specified start offset.
public int FindCurrentWordStart(TextSnapshotOffset snapshotOffset)
| Parameter | Type | Description |
|---|---|---|
| snapshotOffset | TextSnapshotOffset | The TextSnapshotOffset from which to start parsing. |
Returns
FindNextWordStart(TextSnapshotOffset)
Returns the ITextSnapshot offset of the word start character that occurs after the specified start offset.
public int FindNextWordStart(TextSnapshotOffset snapshotOffset)
| Parameter | Type | Description |
|---|---|---|
| snapshotOffset | TextSnapshotOffset | The TextSnapshotOffset from which to start parsing. |
Returns
FindPreviousWordStart(TextSnapshotOffset)
Returns the ITextSnapshot offset of the word start character that occurs before the specified start offset.
public int FindPreviousWordStart(TextSnapshotOffset snapshotOffset)
| Parameter | Type | Description |
|---|---|---|
| snapshotOffset | TextSnapshotOffset | The TextSnapshotOffset from which to start parsing. |
Returns
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()