使用指定搜索模式、文本快照、查找选项和文本结构导航器初始化 FindData 的新实例。
命名空间: Microsoft.VisualStudio.Text.Operations
程序集: Microsoft.VisualStudio.Text.Logic(在 Microsoft.VisualStudio.Text.Logic.dll 中)
语法
声明
Public Sub New ( _
searchPattern As String, _
textSnapshot As ITextSnapshot, _
findOptions As FindOptions, _
textStructureNavigator As ITextStructureNavigator _
)
public FindData(
string searchPattern,
ITextSnapshot textSnapshot,
FindOptions findOptions,
ITextStructureNavigator textStructureNavigator
)
public:
FindData(
String^ searchPattern,
ITextSnapshot^ textSnapshot,
FindOptions findOptions,
ITextStructureNavigator^ textStructureNavigator
)
new :
searchPattern:string *
textSnapshot:ITextSnapshot *
findOptions:FindOptions *
textStructureNavigator:ITextStructureNavigator -> FindData
public function FindData(
searchPattern : String,
textSnapshot : ITextSnapshot,
findOptions : FindOptions,
textStructureNavigator : ITextStructureNavigator
)
参数
searchPattern
类型:String搜索模式。
textSnapshot
类型:Microsoft.VisualStudio.Text.ITextSnapshot要搜索的 ITextSnapshot。
findOptions
类型:Microsoft.VisualStudio.Text.Operations.FindOptions要在搜索时使用的 FindOptions。
textStructureNavigator
类型:Microsoft.VisualStudio.Text.Operations.ITextStructureNavigator要在搜索时使用的 ITextStructureNavigator。
异常
异常 | 条件 |
---|---|
ArgumentNullException | searchPattern 或 textSnapshot 为 nullnull 引用(在 Visual Basic 中为 Nothing)。 |
ArgumentOutOfRangeException | searchPattern 是空字符串。 |
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。