使用给定选项为指定 ITextView 创建一个用于聚合给定标记类型的标记聚合函数。
命名空间: Microsoft.VisualStudio.Text.Tagging
程序集: Microsoft.VisualStudio.Text.UI(在 Microsoft.VisualStudio.Text.UI.dll 中)
语法
声明
Function CreateTagAggregator(Of T As ITag) ( _
textView As ITextView, _
options As TagAggregatorOptions _
) As ITagAggregator(Of T)
ITagAggregator<T> CreateTagAggregator<T>(
ITextView textView,
TagAggregatorOptions options
)
where T : ITag
generic<typename T>
where T : ITag
ITagAggregator<T>^ CreateTagAggregator(
ITextView^ textView,
TagAggregatorOptions options
)
abstract CreateTagAggregator :
textView:ITextView *
options:TagAggregatorOptions -> ITagAggregator<'T> when 'T : ITag
JScript 不支持泛型类型或方法。
类型参数
- T
要聚合的标记的类型。
参数
textView
类型:Microsoft.VisualStudio.Text.Editor.ITextView用于获取 ITagAggregator<T> 的 ITextView。
options
类型:Microsoft.VisualStudio.Text.Tagging.TagAggregatorOptions用于新创建的聚合函数的选项。
返回值
类型:Microsoft.VisualStudio.Text.Tagging.ITagAggregator<T>
textView 的正确类型的 ITagAggregator<T>。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。