Поделиться через


ITextStructureNavigatorSelectorService Interface

Selects and caches ITextStructureNavigator objects based on content type.

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

Syntax

'Декларация
Public Interface ITextStructureNavigatorSelectorService
public interface ITextStructureNavigatorSelectorService
public interface class ITextStructureNavigatorSelectorService
type ITextStructureNavigatorSelectorService =  interface end
public interface ITextStructureNavigatorSelectorService

The ITextStructureNavigatorSelectorService type exposes the following members.

Methods

  Name Description
Public method CreateTextStructureNavigator Creates a new ITextStructureNavigator for the specified ITextBuffer by using the specified IContentType to select the navigator.
Public method GetTextStructureNavigator Gets a ITextStructureNavigator for the specified ITextBuffer, either by creating a new one or by using a cached value.

Top

Remarks

This is a MEF component part, and should be exported with the following attribute:

[Import]
internal ITextStructureNavigatorSelectorService navigatorSelector = null;

Examples

For an example of how to use this service to get a text structure navigator, see Walkthrough: Highlighting Text.

See Also

Reference

Microsoft.VisualStudio.Text.Operations Namespace