根据内容类型选择和缓存 ITextStructureNavigator 对象。
命名空间: Microsoft.VisualStudio.Text.Operations
程序集: Microsoft.VisualStudio.Text.Logic(在 Microsoft.VisualStudio.Text.Logic.dll 中)
语法
声明
Public Interface ITextStructureNavigatorSelectorService
public interface ITextStructureNavigatorSelectorService
public interface class ITextStructureNavigatorSelectorService
type ITextStructureNavigatorSelectorService = interface end
public interface ITextStructureNavigatorSelectorService
ITextStructureNavigatorSelectorService 类型公开以下成员。
方法
名称 | 说明 | |
---|---|---|
![]() |
CreateTextStructureNavigator | 通过使用指定 IContentType 选择导航器,为指定 ITextBuffer 创建一个新的 ITextStructureNavigator。 |
![]() |
GetTextStructureNavigator | 通过创建一个新的导航器或使用缓存值,为指定 ITextBuffer 获取一个 ITextStructureNavigator。 |
页首
备注
这是 MEF 组件部件,应通过以下属性:
[Import]
internal ITextStructureNavigatorSelectorService navigatorSelector = null;
示例
向示例中使用此服务获取文本结构导航器,请参见 演练:显示文本。