IMultiSelectionBroker.SetSelectionRange 方法

定义

清除当前所选内容,添加提供的范围,并设置主选择。

public:
 void SetSelectionRange(System::Collections::Generic::IEnumerable<Microsoft::VisualStudio::Text::Selection> ^ range, Microsoft::VisualStudio::Text::Selection primary);
public void SetSelectionRange (System.Collections.Generic.IEnumerable<Microsoft.VisualStudio.Text.Selection> range, Microsoft.VisualStudio.Text.Selection primary);
abstract member SetSelectionRange : seq<Microsoft.VisualStudio.Text.Selection> * Microsoft.VisualStudio.Text.Selection -> unit
Public Sub SetSelectionRange (range As IEnumerable(Of Selection), primary As Selection)

参数

range
IEnumerable<Selection>

应为的一部分的选定内容 AllSelections

primary
Selection

应设置为的选定内容 PrimarySelection

注解

如果 range 为 null 或不包含 primary,则还会将 primary 添加到中 AllSelections 。 如果任何选择都不基于,将引发此异常 CurrentSnapshot

适用于