ScopesManager.GetRulesInfo 方法
搜索一键/值对规则的范围从集合中获取指定的规则的信息。
命名空间: Microsoft.Office.Server.Search.Administration
程序集: Microsoft.Office.Server.Search(位于 Microsoft.Office.Server.Search.dll 中)
语法
声明
Protected Function GetRulesInfo ( _
scope As Scope, _
ruleInfos As List(Of RuleInfo), _
statusCode As Integer _
) As IDictionary(Of Integer, ScopeRule)
用法
Dim scope As Scope
Dim ruleInfos As List(Of RuleInfo)
Dim statusCode As Integer
Dim returnValue As IDictionary(Of Integer, ScopeRule)
returnValue = Me.GetRulesInfo(scope, _
ruleInfos, statusCode)
protected IDictionary<int, ScopeRule> GetRulesInfo(
Scope scope,
List<RuleInfo> ruleInfos,
int statusCode
)
参数
scope
类型:Microsoft.Office.Server.Search.Administration.Scope搜索规则的范围。
ruleInfos
类型:System.Collections.Generic.List<RuleInfo>搜索范围规则有关的信息的集合。
statusCode
类型:System.Int32状态代码,指示范围是否存在。"0"表示存在的作用域。
返回值
类型:System.Collections.Generic.IDictionary<Int32, ScopeRule>
搜索规则的范围设置的键/值对。
异常
异常 | 条件 |
---|---|
DeletedConcurrencyException | statusCode参数的值不等于 0。 |
ArgumentOutOfRangeException | 在ruleInfos的一个RuleInfo对象的RuleType属性不是AllContent或Url或PropertyQuery。 |
备注
此方法创建不同类型的作用域规则根据中ruleInfos的RuleInfo对象的RuleType属性的值。